The Nazis and degenerate Commies were enemies. See the hammer and sickle alongside the Antifascist flag.
Edit--Adding supporting evidence that clarifies how they were opposed.
https://www.makingqueerhistory.com/articles/2016/12/20/institute-of-sexology-a-place-of-learning
The Institute served as more than a theoretical research hub; it was also a clinic. It was the site of the first modern gender confirmation surgery and attended to many transgender patients and staff alike. One of the founders, Magnus Hirschfeld, was also a known advocate for accessible abortions
They offered their services for free to clients in need, making their discoveries in sexual health accessible to as many people as possible.
This time of knowledge and acceptance would not last. While the Institute was working to change the culture of Berlin, the Nazi regime worked against it. Despite support from individuals like Albert Einstein, the Institute found itself in peril when Hitler rose to power.
Institut für Sexualwissenschaft is the queer Library of Alexandria: built for progress, only to be destroyed by those who rejected it. The entire queer community lost something the day those books were burned. We lost a place where we controlled the narrative. We lost a place of research and education. We lost a place of safety and progress because of hypocrisy, fear, and tyranny.
The Nazis and degenerate Commies were enemies. See the hammer and sickle alongside the Antifascist flag. https://cdn.vox-cdn.com/thumbor/5O520uu8WTxWzPSyTcsfD09y7bw=/0x0:1606x884/1200x0/filters:focal(0x0:1606x884):no_upscale()/cdn.vox-cdn.com/uploads/chorus_asset/file/20023008/Screen_Shot_2020_06_07_at_11.26.08_AM.png