Of course it was a racist attack. There will have been dozens of Thais with their masks off either eating, drinking or just talking to each other.
Just because you are white does not mean you are not subject to racism.
How would you feel if a Thai was attacked in a western country for not wearing a mask while eating? Would you suggest they should also get deported because they are only a guest?