I don't see it as racist but ignorant and disrespectful. They're calling you "foreigner". If you aren't around, and they're talking to another Thai, that's the word used to describe someone born outside Thailand and not Asian. Example. "Today I saw a foreigner walking across the street naked". It's the same as "Today I saw a farang walking across the street naked", Both meaning a foreigner that wasn't Asian.
When you're walking down the street, and just going from one place to another, and someone points at you and says "farang", that's ignorance and disrespectful. We've been coming here long before the Vietnam era and aren't aliens from another planet.
They teach their children the same thing, which is also ignorant. It's something that in that way needs to change.
In the US, we don't point at Thais and say "Thai". We don't say anything unless we want to meet them, where we would say, "Hi, what's your name"? This isn't like calling blacks the N word. That's derogatory, although they do it to each other. Yes, the thinking is still behind here, because old school thinking is still around. I see young ones pointing at me saying "farang' all the time. Adults are the ones who need to stop this, although it's so ingrained in them it will take a long time.