Many white-passing foreigners do think this way. I only speak about Latinos in this department because I try to stay in my lane. However, I do see many foreigners who act in the same way as white-passing Latinos in that they act like racist white people.
What I find interesting is that a lot of Latinos are seeking acceptance from their white counterparts - be it at work or in social settings. What many foreigners fail to realize is that they are ultimately isolating themselves in a place with no allies.
Those same racist white people they seek acceptance from will eventually expose their prejudice towards said foreigner leaving them in a very awkward, but well-deserved space in their newfound home.
That being said, racism in Latin America is a huge issue that isn’t discussed enough. Many Latinos come to the US with a certain, albeit different, type of prejudice towards Black folks. Which is sad considering how diverse Latino culture really is.