Exploring tombs and taking their riches casts shades of colonialism.
Of course, real world racism is bad. We can absolutely always do better with our portrayal of human cultures and ethnicities in the game. But in seeking to draw out the constant parallels and meaning and interpretations of text, it continues to create these problems.
I’m not blind to these readings and understandings of text. But on some level, for me at least, I’m happy to just enjoy them for what they are, works of fiction and the game that explores those fictitious ideas. I’d much rather spend energy fighting problems in the real world and enjoy the games for what they are.
Without going to far into 'university level discourse,' I don't think in general a strict line can be drawn between the real world, on the one hand, and representation, on the other. For example, there is the strain of dnd and pulp fantasy that takes its cue from classic adventure novels of
H Rider Haggard (the drow always make me think of
She (even though that wasn't explicitly an inspiration)), Conan Doyle's
Lost World (recalled in tomb of annihilation, for example), and later iterations such as Indiana Jones. All of these are great fun reads
and also explicitly colonial tropes that together really did inform how readers/viewers understood 'others'.
More concretely, my players include people who are indigenous and people of color. Of course we can compartmentalize 'fun story' on the one hand and 'real world racism' on the other (this is a basic survival strategy). At the same time, what counts as escapism or as just having fun does hit a bit differently. I would never run tomb of annihilation for example, because either I have to significantly change it to make it not feel weird for my group (in which case, why buy it?), or run it and see my players not have fun.
You are totally correct that if you carry some of these lines of thought all the way through you would have to change a lot of the core lore/elements of the game, at least as it exists in 5e. That's why for me rules lite osr systems are increasingly appealing, because it strips all that away and leaves you with just the most essential gameplay elements. The rest is up to you and all the super creative people out there creating beautiful indie/osr products.