I think the difficulty is that sometimes you just freeze.
Not directly trans-related but yesterday my colleague (MC) went to use the ladies* and encountered a girl of maybe 4/5 waiting outside the cubicles. MC was about to ask if she was OK when the girl said something in a non=English language and a male voice replied from inside the cubicle and a man then emerged. I asked MC if she'd said anything but she'd been so taken aback that she just froze until the father and daughter left the toilets.
Personally I would not have hesitated to say "You can't be in here, please take your daughter to the gender-neutral toilet next door" but MC is not as familiar with the issue as I am.
*Toilets are currently being turned into "Unisex, gender neutral, fully-enclosed" type but they haven't started on the female ones yet. The current accessible, gender neutral toilet (with the big triple cross/arrow symbol) is right next to the female toilets, father had to pass it to get to the female toilets.
Edited to add: Being generous, the male toilets are currently out of action as they're being changed to fully enclosed so it's possible that the father just used the nearest. That's the most generous interpretation because, as I say, he could have used the existing GN toilet or, if he'd asked, we could have directed him to the nearest male toilets, less than 50 yards away.