I learned in high school (what I had suspected prior) that my success or failure in math had everything to do with how it was taught. I've had a weakness in numbers forever (counting big numbers, $$ in my head). But once we got into Algebra, I saw exactly how language changed everything. One teacher made everything clear as a bell, he used joke euphemisms for algebraic terms and formulae. We got it. I changed schools and immediately fell behind because the teacher there was rigid, intolerant and wouldn't change his way of explaining things. In fact, he was defensive if you didn't understand him. The whole class seemed to "not get it", no gender bias there. And he lied about being willing to help.
I waited until college to try again. Once more, one teacher made everything so simple and the next one had at least two failing classes (while I was failing, I also tutored her beginning students).
Shortly after, I was asked to tutor an 8th grader in math. She had my former 8th grade math teacher who openly discriminated against blonde girls (there were 2 other teachers at this school that did that). I'm a brunette and was unpopular so I didn't get that treatment.
I taught her pre-algebra methods to solve her word problems. I tell you, 8th grade math was unnecessarily difficult. It's like a perverted gauntlet. She massively improved and didn't require math help the next year.
Except for the one 8th grade math teacher (who hated a particular type of girl), all the "bad" math teachers were indiscriminate. No gender bias. But the overall gruff and stubborn mannerisms may have affected girls more because they felt more internally shamed of their performance.
Years later, in university I took a statistics course that was guaranteed an easy A. I got Cs in it and constant ridicule for "not getting it". No matter what, I couldn't understand the lessons and no one could understand why not.