Buenos Aires is one of the most cosmopolitan and multi-cultural cities on the planet,
The city itself certainly is cosmopolitan (i.e. Having constituent elements from all over the world ) but (average/most) Porteños are certainly not cosmopolitan (i.e. a person who is free from local, provincial, or national bias or attachment) and you will see this reflected in daily life, explaining some of the racist/xenophobic/discriminatory language, thoughts and actions. Remember that they are not directed to you as an individual - they are simply manifestations of someone's inner world and you may be a trigger. Institutionalized racism like you would encounter in Cape Town or Tel Aviv for example, you will not see here.