It's not about communists being homophobic, it's about a system that is designed around rigid social prescription. Communism views humans in these ideal terms, as if once culture and history and everything else is stripped away you're left with standard units.
When humans inevitably do not, by their individual nature, conform easily to the system it's seen as a threat.
It's why the CCP erases every cultural or religious entity and replaces it with a state-friendly simulacra