I remember at the start of Y6, as part of his introduction, our teacher announced that we were too old to ask permission to go to the toilet. Instead, we were to just leave and say "sir, I'm going to the toilet" on the way, or if he was talking and it couldn't wait, just make sure he could see us and gesture in the direction.
It worked fine, though we were annoyed to go back to asking again in Y7. Though even in secondary there was still no restrictions, you just asked and got told yes.
My kid's Y4 teacher knocks 2 minutes off play for using toilet in class time, but she can't get the classroom drama/bullying under control to save her life, whereas there was absolutely nothing like this last year with the same cohort and an older, more experienced teacher. Pathetic.
My Y4 teacher controlled roughly the same number of kids, with no TA, jammed into a tiny portakabin.
If she needed to go to the loo or talk to another teacher, she would put one of the goodie-goodies in front of the board with instructions to write the name of any kid who spoke or moved from their chair for her to deal with on her return.
If you zoned out while she was talking, a thrown marker would bounce off your desk to wake you up.
I think a lot of these stupid blanket restrictions are there to compensate for teachers being expected to be fluffy bunnies instead of commanding respect.