The school could have sorted this easily, if they genuinely weren't being discriminatory, by changing their 'rule' to state all hair longer than x inches must be securely tied into xx, xy or xz styles or similar.
At that point, the type of hair ceases to matter, and all the children with hair longer than their ears would have had to plait it or ponytail or bun it or pigtail it.
Frankly, I wish that's what all schools would do!
BUT, this one didn't. They targeted this one child and her Afro directly - even in the specific wording of the policy - because, as she says 'my hair grows out, not down'.
That's down to her ethnicity, which means they were targeting a difference caused by that ethnicity and subjecting her to different rules than others because of it. That's pretty clear cut racial discrimination.