You are totally right. What happened with Tzuyu wasn't racism because she's ethnically Han Chinese, she's not an ethnic minority compared with mainland China. It wasn't xenophobia either, because Chinese see Taiwan as part of China
What lead to her backslash was another thing altogether, it's about politics propaganda mostly and extrem nationalism. Think about the backslash AOA got for not recognizing Korean historical figures but much much worse, because Chinese people are deeply alienated and do not see Taiwanese people as their own, but a bunch of rebels who reject their Chinese pride.
It was shameful for Chinese people and what happened was by no means acceptable or less concerning (as Taiwanese people are always in serious jeopard when it comes to recognition of their own nation), but it's a important distinction to be make here when we compare racism and xenophobia.
Actually, it is the other way around. Chinese people see Taiwanese as Han Chinese but (a majority of) Taiwanese don't see themselves as Chinese. Prejudice is far greater from Taiwanese towards Chinese than the other way around.
About a million Taiwan live and work in China. Taiwanese companies are heavily invested in China. Taiwan trade more with China than anyone else. Chinese people from the PRC though cannot work in Taiwan. Chinese companies cannot operate in Taiwan unless given a waiver. The antagonism is pretty one-sided.
The Chinese are willing to take inequities as long as Taiwan doesn't declare independence.