Philosophical issues aside, the Supreme Court is sort of ok with “fixing racism by being racist” if it’s done to compensate for historically being racist.
Many countries do this and it's not controvertial. The UK Equality Act says that given two candidates of equal ability, it's legal to pick the candiadate from an underrepresented background purely because of that.