I think that a lot of this is about allowing children to have agency over what they wear, and I have no problem with allowing them that.
Forcing girls to go on cross-country runs in Airtex shirts and gym knickers is cruel and humiliating, but we had to do that for years, whilst the boys wore shorts with their tops.
There were perverts back then, too. We didn't call the paedophiles then - they were flashers, or sex-maniacs or dirty old men - but they were there.
Why not just let the girls wear trousers? I am so fed up with women and girls being expected to dress to suit others' expectations about their behaviour. It is doubly ridiculous to (a) insist that girls wear dresses, then (b) tell them that they need to cover their knickers with shorts in case boys/passing men/teachers get turned on by being reminded of what is underneath the knickers. What if the shorts remind them of what is under them? Do the girls have to wear another pair on top? Meanwhile, the boys are running about freely dressed sensibly and appropriately for play.
In the days when girls who wanted to play physical games (or the cliched 'climbing trees') were called 'tomboys', as it was assumed that this was gender-inappropriate (did any women on here not do those things as girls?) then dresses may have been seen as appropriate clothing for little girls. Now that it is more widely accepted that 'tomboys' never existed, and it was just a name invented to curtail the actions of girls, there is no need for restrictive clothing for children of either sex.
There is absolutely no need to sexualise children by making them cover up if they are able to wear sensible clothes in the first place.