If the layoff was done through the lens of racist consideration, and minority races were given preference, then the odds of a white or Asian person getting fired were higher.
That's already illegal. Even if you can somehow prove in court that "white worker X" would still be fired had he been black (already a dicey and likely impossible feat), just the fact that the employer already admitted that this worker was under more risk for getting fired due to his race, a-priory creates a cause of action against the employer.
If I say "I give preference to hiring men over women", and a woman is rejected and then sues, trying to show that I would not have hired her even if she was a man is arguing from a losing position.
The policy itself is racist and illegal.