Dumbledore is an example of that. I'm sure Rowling had good intentions, but I don't recall a single bit of the entire Harry Potter books that made me go 'oh maybe he's gay'. She's telling, not showing, and that's total bullshit, and I'd never count that.
I don't think she had 'good' intentions in the sense that she decided to make Dumbledore gay to increase the social diversity present in her books in order to help combat harmful societal norms. I think Dumbledore as she imagined him simply happened to be gay, her intention was simply to write the character she imagined. There was never a part in the Harry Potter books that would make you think that (except possibly some of the brief references to Grindelwald), because Dumbledore's sexuality is never directly relevant to any of the material in the book. Why would it be mentioned? To go out of her way to mention or to bend the source material in order to fit it in is definitionally what tokenism is: saying 'hey, look, I have a gay character, and I am emphasizing the fact he is gay
just to show I have a gay character'.
LGB people aren't defined solely by their sexuality. Except in spheres where you would expect their sexuality to be relevant, there's no narrative need to mention it. Dumbledore is a well-written gay character precisely because of this - he is well-written, and he also happens to be gay. It's just not his sole defining feature because he has depth. There are well-written gay characters who are explicitly gay, yes. This is a film example, but Omar from the Wire is obviously gay. But that never feels like tokenism because it directly affects his relationship and plot arc. Other characters treat him differently because of it, as you'd expect in impoverished areas of Baltimore. If Omar wasn't gay, you couldn't tell the same story. In contrast, if Dumbledore wasn't gay, the story would be (almost) exactly the same, with perhaps minor changes to the parts involving Grindelwald. That's why it's not mentioned.
This is why HUELEN is perfectly right to point out the heteronormative assumption. It's really harmful to just assume that any character who isn't explicitly defined as gay or doesn't have their sexuality revealed is therefore straight. It implies that being gay is the sole defining characteristic of gay people. As viewers and readers, we very rarely see the entirety of the lives of characters. Some books are written in first-person, some third-person narratives still describe the thoughts of some of the main characters. In these works, we'll probably be able to know whether the protagonist or these main characters are gay or not. Everyone else, whose thought processes aren't described? There's no reason to suppose they're straight. So why do it?
This is mostly a defense of Dumbledore and a criticism of tokenism. I agree that there's a need for well-written, explicitly gay characters whose plot arcs to at least some extent revolve around the extra burdens that being gay can place upon people, the discrimination it can bring. However, that doesn't mean that gay characters whose plot arcs don't revolve around this are bad, or that you
can't be gay without this plot arc.