It’s very tricky, I can see both sides of the situation.
(BTW I do really recommend period pants as they really help reduce leaks. Primark and Sainsbury’s sell them now, they have got a lot cheaper).
Both my kid’s secondary school have a rule of no toilet during lesson time. At one school this was because of kids taking drugs in the toilets. At the other it was because of the constant vandalism of toilets - the school could simply not afford the repair bills anymore.
During break times the teachers and lunch duty staff are on patrol in the corridors to keep an eye on things, but during lesson time there aren’t enough staff to monitor all the corridors, so if kids are out of lessons this is usually when the bad behaviour happens (vandalism, bullying etc).
Students with medical needs do have a toilet pass. So it’s better for them because they know they can go during lesson without running into the trouble-makers and bullies.
It is a shame but basically the minority have ruined it for the majority.
Children with significant needs or who are very troubled are placed in schools who do not have the resources or staff to manage them. So the only option the schools have is to bring in stricter rules to try and keep some sort of order. It’s not ideal, everyone knows that.
I agree with other posters, the situation of is also a symptom of the general lack of respect children have for others, for their teachers, and for the school as a whole. They know if they get into trouble their parents will back them up and there are no consequences for their actions. It is very difficult to expel students now (and what happens to them then? That’s a whole other issue).
The government and the media have not helped with their constant criticisms of the teaching profession and the idea that schools are like businesses.
How else did they think this was going to play out?