That's not how developers spend the vast majority of their time. It's a poor signal in my experience. What it selects for is candidates who are immediately comfortable collaborating in real time with someone they have never met. That doesn't mean you aren't getting good candidates. What is means is that I spend far less than you finding good candidates because I also hire people who are great developers and who would fail at your interview.
The compromise here is to talk about the employee's past projects. The downside is now the interviewer needs to get up to speed quickly, and won't have all the necessary context of the organization and (potentially) industry. Not to mention the fact that candidates lie a lot about how much of a role they actually had in projects.
I think what gives our approach balance is that we are also committing to making a time investment. Reviews typically last an hour, which means that the 2 hours we ask from the candidate is matched with 3-5 hours of our engineers' time to review and discuss with them.