Prosopagnosia - face-blindness - is a real thing, that is especially common with autistic folks. Personally I struggle a lot with faces, but I can learn to recognize the faces of people, that I interact often with (still, sometimes I cannot recognize my partner from pictures, for example). Some people cannot learn faces at all.
That being said, in cases like these, it is definitely racism.


I will add, that “support” includes parents needing to tell beforehand, what is appropriate behavior, since that step is failed too often. Then if the kids mess up, they can recognize easier, what went wrong, compared to just fumbling and getting consequences for it, and having to figure out why. Outsourcing the responsibility to teach, just to the environment, leads to catastrophes too. Neither suffocating nor negligence, are good strategies for raising children.