The consequence of mixed sex spaces is that cubicles get made private and enclosed but then have to have a safety mechanism to be openable outwardly from the outside easily (so a body doesn’t stop a door being open). Making cubicles private makes the problem worse. Men can hide, easily access the cubicle a woman/girl is in, and carry out an attack without witnesses.
It also means that they are worse for anyone who collapses inside a cubicle as no one will know they are in the cubicle. In nightclubs the risk of collapse through spiking and choking on vomit is increased - when people feel ill they head to the toilet.
They need to keep the floor to door gaps for everyone’s safety.