Dress codes don't make girls embarrassed about their bodies.  Do you know what does?  Other girls. I developed quite early and pretty spectacularly, if I do say so myself.  I was an awesome distraction to all the boys.  If a teacher told me to cover up, I wouldn't be embarrassed, I would just think "I'm too sexy for this shirt". 
However, the other girls were a different story.  They managed to make me very self-conscious about my legs.  I had muscular legs due to a large amount of walking and bike riding.  The jealous witches made me so embarrassed about my body that all through high school I never wore shorts. All Summer.  When I went swimming I wore knee length cut-off shorts and a bikini top.  And I went to school in the late seventies when knee length shorts were not a thing.  I didn't even own shorts except for those. I think it was even on this board that there was a thread last year or so about not wearing sandals if you have ugly feet.  (FTR I don't own sandals either).  So until women stop body shaming each other, dress codes are the least of our problems.