That's in all likelihood not how it works, you could then avoid being taxed by leaving the country for 5 minutes.
It's probably going to work like the idiotic tax clearance certificate used to work ages ago, before the most enlightened Thai administration in Thai history, the Anand government, scrapped it : more than 180 days in the country in a given calendar year required you to get a tax clearance from the revenue department before exiting the country, or you would not be allowed to leave. That was quite a pain in the behind back in the eighties.