This.
Otherwise we'd be saying
This thirteen year old has chosen to walk topless down the street on the way home whilst still in her school skirt. But that's ok because she's chosen to do it, and that's all ok because that's the fashion in school and no one should body shame the girl in involved.
Or would you say 'hang on a second' maybe we should be setting some standards here and saying there's a line which is there for the benefit of the girls themselves even if they don't recognise it, but unfortunately there are bad men and boys out there and whilst we should do everything we can to stop the said men and boys we also have a duty of care to minor girls to tell them that whilst they are uniform (and therefore can be identified and associated with the school) the school has a duty of care to say 'no don't do it'. Even if it's not enough for a referral for social services.
I see the comments referencing Rotherham. The issue with Rotherham was a multi agency failure to identify girls at risk and to try to act to protect them. This will have included behaviour at school. Overly sexualised behaviour and looking for attention from boys in early to mid teens should be looked through the lens of safeguarding first for this reason.
This isn't blaming the girls for the behaviour of boys or men. It is identifying a problem which needs girls need to be aware of - the line between trying to please and get the attention of boys to fit in and be cool and what is actually them being empowered and making free decisions themselves and to protect them from being photographed in a way that's going to be exploited and can't be erased.
This is why if a girl was filmed at the same level and it shared on social media it would be red flagged as safeguarding.
There definitely is an area where it DOES matter how a teen girl dresses and where school DOES have a responsibility.