My siblings and I all went to single-sex schools and, interestingly, we have all chosen mixed schools for our own children.
I don’t think segregation is the answer. I think boys and girls need to grow up learning to respect one another and, crucially, learning that they can have perfectly normal friendships with the opposite sex.
My experience of an all-girls school certainly wasn’t that removing boys created some wonderfully healthy environment. The girls were on the whole absolutely boy-obsessed. There was a constant competition over who had done what with a boy and, if anything, quite a lot of pressure to be sexually experienced because that gave you status. The boys from the local boys’ school became this huge focus precisely because we had so little normal interaction with boys.
I moved to a mixed school for sixth form and it was a breath of fresh air. For the first time I realised you could just be friends with a boy without wondering whether he fancied you, or feeling that every interaction between boys and girls had to have some romantic or sexual significance.
Until then boys had seemed like a completely different species and, frankly, quite intimidating. I imagine plenty of boys from all-boys schools felt similarly about girls.
Obviously schools need to take sexual harassment and assault extremely seriously, but I’m not convinced the answer is to separate boys and girls from one another. Surely part of preparing children for adult life is teaching them how to coexist, respect boundaries and see the opposite sex as ordinary human beings rather than something mysterious, threatening or primarily sexual.