There are ways to account for that. A model can be fit to race, and then you only predict "on top" of race (meaning residuals). You use that model, which is independent of race.
Machine learning is also very opaque.
If you verify the race field, then now you're in the business of enforcing racial definitions.