Often when things go wrong, it’s because people decide to include something with the best of intentions, but present it in a bad way: there are strong female protagonist, but they are still barbie dolls in chainmail bikinis. There are black characters, but they are magical Negros and the first ones to die in the play examples. There are lesbians, but they are bat-shit crazy and hate all men.
These things are not included because we are evil people, but because they are tropes and images we learn from our surrounding culture, and which we unconsciously include.
One way to deal with this would be to learn everything about everything. But that’s also pretty hard.
However, despite the difficulties, you should try to make games better, more inclusive, to end discrimination, and fight negative stereotypes.
First off: you won’t, not all of the time. You are going to screw up and offend people, who may get angry and criticize your work.
The main thing is that you are humble, and that you keep on trying. If you fail in some way or if people criticize your work, be humble, listen to their criticism, and learn from it.
Respect your critics’ experience. They are not “wrong”. They merely perceived your work in a different way than you do.
Nobody expects you to be perfect. Even if you strive to make games better for everyone, you will make some sort of mistake sooner or later. The reactions that you will face when you do might not always be fair, but they will tell you how other people have perceived your work, and from that you can learn a lot. And screwing up is fine, as long as you willing to listen, be humble, learn from your mistakes, change and try again.