My school toilets were mixed sex for y4& 5 (with open urinal near the door) and the y6&7s had seperate toilets upstairs.
I'd expect boys to transition using male facilities through the junior school years. First using smaller facilities at more restricted venues, and phasing up to larger, public, unknown venues towards the older end.
Yesterday my 10yo nearly followed me into a women's toilet at a busy service station that we're unfamilar with. We were talking and distracted, and he suddenly twigged that he was surrounded by females, turned around and headed to the mens opposite of his own accord. A year or two earlier, he would have stayed with me in that environment but used men's most of the time by then. I doubt he would have made anyone panic, he's frequently "misgendered". Generally he gets on with it, but there are some park toilets where I loiter right by the door if he's on his own.
We had an awkward moment on a campsite when he was 6 and became in need of assistance on the toilet and I had to enter the men's to help him (with clearence from the cleaner who happened to be there). He had chosen to use it himself but got caught out. He had started going in a pair with his autistic older brother at about 6. With undiagnosed autism and a younger sibling, DS1 started using mens toilets from 8, so slightly older.
It's a phasing and situational thing depending on the child and the environment, not a universal abstract cut off age where all children are ready all of the time at the same point.