Chaosmancer
Legend
I kind of lean into this. Part of the fun of D&D is, Legolas and Gimli style, first establishing and then undermining the assumptions each race tends to hold toward each other, and therefore the assumptions that underlie racism as a world view, whether through the actions of pcs or npcs. I think you can have racism and prejudice in your game and depict it in such a way that it's not seen sympathetically. Likewise, you can have slavery in your game without supporting slavery, and without depicting it as a good thing. Especially when it's explicitly not all members of the race that are racist (and especially when it's never forced on pcs).
I agree that you can have it and it not be sympathetic. But the bolded part is the more important part, it has to explicitly be not all members of the race,
And elves being "haughty" is a really deeply ingrained stereotype. To the point where I'm not sure if it is explicitly not all elves or not, who are said to be this way. And paternalistically thinking "we need to care for and guide these lesser races" is still haughty, just not rude about it.