Ernst Röhm, leader of the Nazi's SA forces, was gay. People did not join the Nazi movement because of the impeccable life style of their leaders, but their political program. Same with AfD or Trumpists.
>Röhm's appointment was opposed from the beginning by some in the SA who saw it as cementing the subordination of the SA to the Nazi Party's political wing. His homosexuality was seized upon by those who disagreed with the organizational reforms but could not openly criticize Hitler without breaking with Nazism, because of the Führer principle. Hitler said that the personal life of a Nazi was only a concern for the party if it contradicted the fundamental principles of Nazism. The leader of the Berlin SA, Walther Stennes, rebelled against the SA leadership and declared that he and his followers would "never serve under a notorious homosexual like Röhm and his Pupenjungen (male prostitutes)". On 3 February, Hitler dismissed Stennes's objection, stating, "The SA is not a girls' boarding school."
In case it is not obvious from my original comment, I am not trying to paint Nazi party as a beacon of DEI. The Nazi state went on to murder thousands of homosexuals. But in response to the OP, Röhm was certainly not closeted and it is doubtful that his homosexuality could even be described as an 'open secret'.
https://en.wikipedia.org/wiki/R%C3%B6hm_scandal
"Beginning in April 1931, the SPD newspaper Münchener Post published a series of front-page stories about alleged homosexuality in the SA, which turned out to be based on forgeries. SPD leaders set out to obtain authentic evidence of Röhm's sexuality and, if possible, convict him under Paragraph 175. Röhm was tried five times, but never convicted. During the German presidential election in March 1932, the SPD released a pamphlet edited by ex-Nazi Helmuth Klotz [de] with Röhm's letters to Heimsoth. This second round of disclosures sparked a plot by some Nazis to murder Röhm, which fell through and resulted in additional negative press for the party."
It cannot be more public than that. The Social Democrats used the anti-gay paragraph.
Another known gay Nazi was Rudolf Hess:
https://www.nytimes.com/1991/07/10/opinion/l-hess-homosexual...
And Klaus Mann wrote a novel about German actor and director Gustaf Gründgens, famous for his Mephisto role in Goethe's Faust:
https://en.wikipedia.org/wiki/Mephisto_(novel)
"The author Hermann Kesten suggested that he write a novel of a homosexual careerist in the Third Reich, with the director of the state theatre Gustaf Gründgens as a subject matter. Gründgens's homosexuality was widely known."
The whole selective persecution of gays began after Röhm's paramilitary SA surged to 4,000,000 members in 1934, and a couple of people including Himmler intrigued against him.
People like Hess and Gründgens were never touched or exposed even though most people knew.
It's reasonably simple: Be sufficiently powerful and your sins will be overlooked (for a recent example: See Donald Trump's "sentence" in New York). And in non-rule-of-law societies your sins-while-powerful will be used against you (this is why democracies historically always had immunity arrangements)
He wasn't killed by Hitler because he was gay, as the article and parent comment explain. The first public disclosures of his homosexuality came in 1931. Before that, everyone who mattered in the Nazi party had already known for years. He was killed in 1934 for political reasons.
Homosexuality is also a significant problem among the AfD and its supporters. Röhm's example illustrates that it is not paradoxical for a known homosexual to rise to a position of power within a homophobic party. If even the Nazi party of the 1930s could tolerate known homosexuals within its ranks, that ought to tell us how seriously we should take the argument that the AfD can't be racist or homophobic because of Alice Weidel!