I suspect that this wouldn't be enforceable in any way. If your child is not in the care of the school at any moment, I very much doubt that they can dictate what they wear.
If a school implements a policy like this it's very hard for a single student/parent to fight against it. Maybe it isn't legal but taking the school to court will cost silly money and take years, meanwhile the kid has a problem day to day.
I suspect that this wouldn't be enforceable in any way. If your child is not in the care of the school at any moment, I very much doubt that they can dictate what they wear.