I’m on the side of not including that. Personally I feel like subjects like that are best handled by people who actually face it in real life and it’s still difficult to do even then
There are exceptions to that like Love, Simon, like others have cited, and King Falls AM (for including homophobia, since I know very little media that actually does trans characters well) but those were done carefully and from a place of empathy (if not with homophobia/transphobia etc, then with how it feels to be alone or be put on the spot or to have a secret you’d be devastated to have revealed, etc) with input from many different people, including LGBT teens in the case of Love, Simon and even then it’s risky to do. When you include discrimination of any sort, it HAS to serve some sort of purpose to the story beyond “realism”, whether it’s a direct theme of the story or it’s deeply connected to part of a character arc. Inserting it when it has no purpose to the story only brings grief to the people playing your game as an escape and honestly, if you want realism, you’re best off sticking to nonfiction
This is not the end-all be-all method of getting it right, but what those two stories had in common besides having queerness be a central part of the main character’s arcs was that the antagonists who outed or were otherwise homophobic to Simon in Love, Simon and Sammy in KFAM were well established to be awful people long before what happened happened and that both Simon and Sammy were met with compassion by the end, if not immediately after it happens, and the number of characters supporting them far exceeds the ones who don’t. Also the aftermath of Simon getting outed was public, but his reaction was relatively private while the opposite happens in KFAM, so the entire event isn’t made a spectacle. Love, Simon being a romcom and KFAM starting out as a comedy (but gradually grew into a drama) certainly helped because with those genres, it’s pretty safe to assume that the hero will turn out okay in the end. Both also had multiple gay characters so the character facing the brunt of the homophobia isn’t singled out as The Gay Character and neither of them are interactive media so how things play out are set in stone
And even then, no matter how careful it is and how well it’s done, there is still the risk of triggering a portion of your audience/potential audience and those people are completely justified in avoiding your work to avoid in-game discrimination. I love both Love, Simon and KFAM to bits as a gay man and I would not change either of them for the world, but I have to admit that there were times when they were difficult to watch/hear respectively even when I CHOSE to sit through them and consider both characters’ experiences to be very personally important to me. (That said, I feel like the scene in KFAM would have been hard for me to listen to even if I wasn’t gay, with just how emotionally powerful a scene it was.) They are both powerful stories with LGBT elements, but I can still very easily see why other people might want to avoid them. The risk comes even with an LGBT creator or with the best sensitivity readers or most meticulous writing
I started off talking about how stories have succeeded in including discrimination in a sensitive way that also actually adds to the depth of the story, but this is NOT a guide on how to be another exception and write “good” discrimination. I’ve seen a lot of people try to insert it casually for the sake of “realism” but to have it be an actual part of the story and not be just an offhand remark that may at best break immersion for the reader and at worst make you lose a reader would take a lot of work and outside input. Ask yourself whether or not it’s truly important to your story and why when you decide on it
Whether or not a person is okay with it depends on many different factors you have no control in. While I personally would engage in it in a movie or podcast or other noninteractive form of media, I wouldn’t do so in a game