So why does the left frame it as racism, when its not race dependent?
Because race is a conservative construct imposed upon a reality that does not conform to its narratives and thus leftists understand xenophobia as inherently connected to racism, both are products of the same rejection of universal shared traits and quirks to humanity that outweigh the details of where and how someone got somewhere or how their family did. To put it another way we are all too different as individuals to lump into categories of "race", the differences and similarities between us are far too vibrant to describe groups of humans that way.
The concept of "black" was constructed, racism against black people in the US created the category as a differentiator, but never did it actually have a clearly definable line that could be traced according to an internal logic along skin tone, along heritage along anything... it was always an abstract concept skewered into reality by hateful beliefs that contradicts itself constantly.
This is why xenophobia and racism are so closely linked.