Rather than putting the onus on girls to add more layers of clothing - which is potentially uncomfortable and hot, plus less practical - why don't the schools change their uniform policies? And their rules around sitting cross-legged, and getting changed?
If skirts and dresses are such a safeguarding issue, then bring in shorts, skorts, and trousers only.
Schools should also stop children changing for PE in the same classroom together because everyone sees knickers and underwear there.
And schools should also stop forcing the children to sit cross-legged on the floor - because that's another reason that girls end up flashing their knickers. Children are forced to sit cross-legged, any other sitting position is typically not allowed. This puts girls at obvious risk of showing their knickers.
If this is such an issue for little 5 year old girls, the solution is not to force more layers onto little children but to change the uniform and school practices.
Females of any age shouldn't be the ones to have to adapt their behaviour because of the predatory behaviour of others.
If little girls occasionally flashing knickers is an issue, then change school policies - don't put the onus on the little girls to have to adopt potentially uncomfortable solutions to accommodate others. If your daughter is happy to wear additional shorts under a skirt then great - but it shouldn't be compulsory. The behaviour of little girls isn't the issue here.