The answer to your question is that it's not a problem of socialization but personal education.
As someone who is very respectful and tolerant and has gay and lesbian friends without being myself, I can confidently say that this issue stems from a lack of understanding and acceptance in individuals.
It may be because of their upbringing, external pressures, and influences, or simply a lack of exposure and interaction with the LGBTQ+ community.
Rather than blame society, we need to focus on educating those who may not understand gender identities or sexual orientations outside of heteronormativity.
It's important to remember that everyone deserves respect regardless of their sexuality or gender identity. Therefore, strive for better friendships by seeking people with progressive mindsets who can show greater understanding and tolerance.
These tough conversations can be difficult, but speaking up is essential if someone disrespects you because of your sexuality.
Let them know why their views are problematic and how they could work towards changing them through positive dialogue.
Be sure to explain why it's so crucial for LGBTQ+ people to receive equal rights and treatment in society and provide resources for further reading on the topic if possible.
It might help them develop a more tolerant attitude and give a better atmosphere for building solid relationships based on mutual understanding and acceptance.