Males have their own set of unspoken "man rules." They talk to each other differently than when women are around. If you look like a man, they're going to treat you like one. People only see the outside, the superficial, the "book cover" so to speak. No one consciously thinks, "That's a guy, that's a girl, gotta treat the guys like guys and girls like girls." It's innate. Natural.
I empathize with you. Before I transitioned it was very hard for me to be around men for the exact reasons you mentioned. They were, for the most part, misogynistic and demeaning, and it offended me on a deep level. It also scared me because I thought, "Jeez, if they only knew about me!" But nowadays I don't hang out with men.
I suggest you stop hanging around these guys you're speaking of, if at all possible. If people, anyone, makes you feel uncomfortable for any reason, why bother hanging around? Find better friends.