i am mostly being facetious (i read one hp novel as a child, saw two of the films on tv i think and part of the last one at an ex boyfriend's house, but i know the basic outline of the story i think but it definitely wasn't a part of my childhood the way it was for others)
although the problem isn't having bad things happen to a gay character (or """""gay""""" character) at all, but that killing off the few gay characters in a story is a recycled and tired trope and if you're gay in the woods and no one is around to hear it, are you really gay. similar to having villainous characters being gay or coded gay, it's not that it's bad as an isolated incident but as part of a long history where that would be the only way any non-hetero characters would be seen.
having more than just the token minority character and portraying them in a variety of diverse ways would help. i'm sure you could still find someone who would complain but this is the internet, you'll find anything if you look hard enough.
anyway i wasn't trying to be serious i just wanted to shitpost
did jk really once say on twitter that kids in hogwarts would experiment sexually and circle jerks were common, honestly at this point have the whole 'wizards used to shit on the floor then magic away the shit they just did on the floor until they started using toilets' thing i don't know what to believe