No, that's a complete cop out. We need to properly address sexual assault and misogyny, not segregate girls.
What happens when they get to college, uni, work, general life? If we stick a bandaid over the issue we're just pushing it down the road.
And think of the position this puts girls who choose male dominated careers. I have a two family members. One is at college completing an apprenticeship in a male dominated trade, the other is one of only a handful of women on a STEM master's program. How uncomfortable would it be for them if their first experience of mixed education was walking into an environment almost entirely filled with boys/men (who, under your model, would also have never studied next to a girl/woman). We need more girls to see male dominated fields as fair game, not measures likely to put them off and/or make their time in education more difficult.
Proactive education around consent, incredibly strict zero tolerance policies, and wider education about equality will do far more than creating more segregation in schools.