This is an interesting one. I think this ruling may be legit, if stupid?
The CROWN act specifically says that a school can't limit access based on hair "style or texture" IF that style or texture has particular associations to that person's "race or national origin."
A blanket ban on hair longer than a certain length wouldn't violate that at face value since "longer than X inches" isn't a style or texture in and of itself, and isnt particularly associated with any race or national grouping of people?
And while certain religions prohibit cutting your hair, I think that would be a standard religious exemption, the same way you're allowed to have a "no hats" rule, even though some religions require them. That's long been upheld by the courts.
I think this is a crazy hill for the school to die on, but I think it might be within their rights to die on it? Idk though, I'd be interested to hear what other people think.