Star Trek is a really bad example, because the whole point of Star Trek is that it is an ideal utopia where things like race don't matter.No the problem is that we live in an outrage culture and people just want to jump on what I Say. If there was a black person in Star Trek, it really doesn't have the effect on the person does it? I mean they only mention Sisko's race twice. And even if the story is set in today's world, if I'm watching a blockbuster film, I don't want to be forcefed some kind of message. Sure if a character is female then make them female don't make them female because you have to fill a political checkbox
If we are talking about stuff set in the modern day then it has to matter, it is such a major part of what a person's life is in this day and age that if the character is going to be realistically developed then their race or sex or whatever can't just be ignored.