well theres not really a good sollution.
you could go the route of not asking race/gender at all in applications, but this will favour white people still as they tend to come from more privalaged backgrounds compared to minorities and thus will appear more suited to what they are applying for, obviously not always but a majority of the time.
or you can have quotes, which then has the issue of just taking on people because of their race / gender to fill the quota rather than because they are more suited. neither are really ideal.
maybe anyone has a 3rd option, i dont know.