Mandating is a problem (including in any situation where girls have the choice of “trousers, shorts, or dress/skirt with shorts” - it’s the implication that dress/skirt without shorts isn’t ok that’s problematic).
Girls choosing for themselves seems fine, although it doesn’t happen in a vacuum does it, and I’d be saddened if my DD felt her knickers showing when cartwheeling was a problem at 4 (she’s 3 now so this is a bit in the future here).
I think some of the reasons adult women might choose shorts under dresses don’t really apply to pre-pubescent girls. I sometimes do, because I’m quite active and accidentally flashing my knickers is socially a different thing to a child doing the same. When I’m a bit heavier it feels nicer because chub rub, but likewise that’s not generally an issue on a leaner younger frame.
The flimsiness of girls’ knickers has been a revelation to me - after a couple of packs I’ve now switched DD into boys’ pants. The fit looks so much more comfortable! Obviously I knew about flimsy girls’ shoes and so on, but I naively thought knickers would be reasonable FFS.