Ideas of masculinity have often been more important.
Definitely. And one may argue that in societies dominated by industrial labor (like China and Russia are today), this sentiment is still very strong.
I don't think that it is just a coincidence that the situation for homosexuals got better in the Western world at the same time when industrial labour was in decline. Though there are other reasons too, of course.
Besides, outsiders of any kind had a very hard stand in the societies of "real socialism" in general of course. It was probably easier to be a long-haired nonconformist subadult in 1950s West Germany (or Britain, France...) than in 1980s East Germany.