the moral overall is that "corporations can't be trusted with telling a good story"
however specifically it has happened twice that very large media franchises have essentially obliterated and destroyed a pair of highly compelling and interesting characters out of anxiety over those characters being perceived as gay.
Bucky and Steve in the MCU are the first example; Steve's friendship with Bucky was interpreted as homoerotic by many fans, and the franchise responded by going scorched earth on the friendship itself.
but a more blatant example in my opinion was finn and poe dameron from the (gag) sequel starwars trilogy. it's been forever since i saw the movies but i remember they had a very cool chemistry and energy together and when they were separated from each other and randomly stuck with extremely flat female love interests, it came across to me like Disney was desperately reassuring the audience that they were not gay.
But this is bad storytelling, because if the bond between two men is a powerful driving force of the story, a good storyteller follows that to its conclusion because it is providing the story with aliveness. It is possible that this means you wrote a gay story or one that will be perceived as such. Love is deeply overlapping with other love. If you find the possibility of homoeroticism intolerable, you will uproot love, closeness, and friendship entirely from the story in the process of trying to root it out, and the story will be fucking dead.
This fact is so much about good storytelling and so little about wanting characters to be gay or not. Even if you are homophobic, you cannot deny the truth of it in my opinion.