You do know that the US taxes long term capital gains at 15%, right? Retirees often live off capital gains.
Unfortunately, Thailand taxes capital gains as ordinary income, which could be higher than 15%.
So for the large number of US Farangs in Thailand who receive income from capital gains, the DTA gives them a credit, but they still would likely have a Thai tax liability.
Most people here are discussing the letter of the law. But we are in a country where the police don't even enforce motorcycle helmet laws.
The real question is enforcement of Thai income tax, and I have no clue what happens when the million Farangs living in Thai villages (and who don't know anything about any of this) simply don't file.
if you reside in Thailand for more than 179 days in one year in Thailand, you are a Thai tax resident, regardless of your tax status in other countries.
In 2024, you collected capital gains in the US and remitted some or all of those earnings to Thailand. That was a taxable event - even though your initial investment was made years ago.