A few things:
For those bringing up Elagabalus as gay or trans - or any other Romans, for that matter - please remember that the way we describe our sexuality and gender identity in the present day is not particularly useful for classifying people before those terms came to widespread use. Romans didn't view sexuality in terms of the gender of the people with whom they were having sex, but in terms of the roles which people preferred to adopt during sex, i.e. active or passive, and their own gender. A lot of the Latin terms that get (mis)translated as gay are actually in reference to this - for a longer explanation see Holt N. Parker's "The Teratogenic Grid" from Skinner and Hallet's Roman Sexualities.
A person who today might be called gay - for example, a man who preferred to be with other men, but had a preference for topping - would not be considered to have any sort of alternative sexuality. A man who had a particular preference for giving women oral sex, on the other hand, would be lumped in with men who liked giving oral sex to other men. So really, anyone wanting to answer anyone from ancient Rome to this question: don't.
With that out of the way, I will also point out that "gay" and "trans" are completely different things. A person can be trans and gay, or trans and straight, or trans and bi. Gender identity is unconnected with sexuality. All of which, by the way, are words that are not really appropriate to use with regard to ancient peoples.
Finally, as has been pointed out, there have been openly gay heads of state, and there are currently openly gay heads of state. However, those of you who are citing current heads of state should know that these fall outside the twenty-year rule, and that's why your comments have been deleted.
Questions like these often come up, but be aware that our concept of "gay" or "homosexual" as a sexual identity is a relatively recent phenomenon. An emperor like Hadrian would probably be considered "gay" today because he openly had a male lover which he clearly loved (to the point that we wanted the senate to deify the lover when he died). But since the concept of "gay" as a sexual identity simply did not exist at the time, it does not make sense to call him "openly gay". The Romans did not have words for "homosexual" or "heterosexual".
Iceland had an openly Lesbian prime minister from 2009 - 2013. Jóhanna Sigurðardóttir. She was head of Government, rather than head of State, but that's an academic distinction as constitutionally the greater Powers were with her, not the more ceremonial President.