>>212431124 (OP)framing it as a flip is wrong in my eyes, because both depictions are part of the same lineage:
the use of very nearly overt-homosexuality—perhaps from the 60s onwards—as a comedic element served to psychologically defang the perceived threat in the minds of heterosexual men—"this fag is the butt of the joke, he's no threat"—and in doing so allow a degree of homosexual representation in media
the move to depict them as embodying positive qualities is just a progression of the same intent as them being comic relief
but the fact they're Gary Stu's is a product of the same modern neomarxist thought which produces girlboss slop—if not for this strain of thought taking root, you would see a progression from comic relief to well-rounded male characters who just-so-happen to be gay