I teach year 6. I don't let children go to the toilet during lessons. Would you have a problem with this rule for your child.
Yes I do.
My child suffered like this at about that age and it massively impacted his confidence.
Human beings go to the toilet when they need to go not when someone else says it’s ok.
To do otherwise is de-civilising.
I’m afraid you’ve got that one wrong. Utterly wrong.