I came up with a fan-fictiony get out clause for the show so far.
In the Trek prime universe they have suffered a Eugenics War and have entered into a money free Utopia.
That could mean that the genetic factors that play a role in some people ending up a bit lavender could have been removed from the gene pool around the same time that the third world war reduced that pool dramatically.
One of the happy social consequences of having childless adults with lots of spending money and free time is they can be potent cultural contributors.
More free money to spend on the arts and more free time to enjoy and create works etc.
But with a money-free society that would be nullified as anyone could be an artist with machinery doing all that tedious manufacturing and it costs nothing so there would be no financial factor in which the homosexual humans could add value to.
So maybe on Earth there just isn't that many homosexuals left.
But maybe not everyone was happy with a the single world government and left to form independent human faith based colonies.
The one way to resurrect the genetic tendency for homosexuality would be to repress homosexuals so they are forced to keep up the appearance of being heterosexual and marry.
A faith based colony may also be against genetic screening so using technology would be a no-no.
So you would have a Liberal money-free Utopia with no homosexuals and a stiff repressed cleric lead colony filling up with them.
If the Federation needed to open diplomatic relations with a culture that revered homosexuality and would only talk to gay ambassadors it might make for an interesting scenario where they have to borrow some gay humans from a culture that denies that they actually have them.
It would be a bit like The Voyage Home but with homosexuals instead of whales.