Teachers are very much in a catch-22.
Two recent scenarios.
One class (all Y11) almost all students arrive late to lesson already (not through fault of anyone else; they are frequent dawdlers who will visit friends/ chat in front of my room and ignore invitations to come in) and some immediately ask to go to the toilet. Not only are they late, but they also just had lunch (an hour, so plenty of time).
I point this out and get met with "Lunch is for relaxing". Students go anyway and are now truanting according to my school's policy.
One Y8 class, second lesson after break, so many will not have had a chance to go to the toilet. Still, a class of 32 students.
10 students ask to go to the toilet on arrival to the lesson. Of those, 5 are told sure as they arrive with plenty of time to spare (we have changeover time). The other 5 arrive just before they would be marked in as late, get told no with a look to the time. By now, some of the class have finished their starter task and are waiting for the lesson to begin properly and by school policy I have to begin the lesson, take a register, deal with missing equipment, phone medical support for one student who'd injured themselves in another lesson.
School policy says we are not allowed to let students without a toilet pass go in lesson time and senior leaders patrol the hallways, giving us grief if we go against said policy. Rightly so, many students truant after asking to go to the toilet and too many are roaming hallways.
Several students ask to go again, I tell them not right now. After 45minutes, one student looks like they're about to be sick, so I let them go. Cue protests from the other 4 who were told no. I explain why that student and no one else at the time. Two students walk out and are now truanting, nothing to do with toilets. Another walks saying "I need a piss", but comes back after a while. The others remain in the lesson, fine with having been told no (and are allowed to leave slightly early to go relieve themselves).
SLT are unhappy kids are truanting, kids are unhappy because I can't let 1/3 of the class go to the toilet, I am unhappy because I have to deal with the fallout.