you donโt have to be a citizen or have a Thai passport to be a legal resident of Thailand or another country. There are many foreigners who are temporary or permanent residents of Thailand.
Youโre confusing legal residency, immigration status, citizenship, and ethnicity.
You can also become a naturalized citizen of a country and have a passport of a country and not be ethnically of that country.