The way to tell would be to send effectively identical resumes differing only in the identity characteristics of the applicant and observing if there are disparities. Of course, most companies aren't interested in doing this: why would a company want to incriminate itself?
> ...an unjustified adverse impact on members of a protected class...
Requiring doctors to have an MD is going to have a disparate impact on all sorts of factors, including protected classes. Likewise, an anonymized leetcode question isn't going to pass candidates uniformly across identities. But there's a pretty strong case that the use of such measures is justified.
Prioritizing candidates with a referral might be argued to be a disparate impact without justification, and that's somewhere there might be a stronger case but it's not so clear cut.
https://www.wsj.com/articles/black-latino-teachers-collectin...
The commenter made it clear the team is becoming not just less diverse, but completely homogenous: "every one on the team" sharing the same identity characteristic as the lead.