Funny Thaiembassy.com isn't actually a Thai embassy or even any official site as might seem
The law says
1.Taxable Person
Taxpayers are classified into “resident” and “non-resident”. “Resident” means any person residing in Thailand for a period or periods aggregating more than 180 days in any tax (calendar) year. A resident of Thailand is liable to pay tax on income from sources in Thailand as well as on the portion of income from foreign sources that is brought into Thailand. A non-resident is, however, subject to tax only on income from sources in Thailand. https://www.rd.go.th/english/6045.html