The drawback of this approach is that candidates will judge the work they will do based on the exercise. I’ve gotten these exercises before and just noped out, determining from it alone that this isn’t going to be a place I want to work at. Or maybe that’s a good thing? As long as the exercise is representative of the work the candidate will be doing, it gives them a chance to decide early if it won’t work out.
I received one of these when I applied at twitter (pre-musk) and it was so poorly worded and organized that it went badly for me and the interviewer. But I see that as dodging a bullet (google was a much better fit for me).
I prefer that sample work be longer, substantially comprehensive and serious work as you say, but that the candidate's time be compensated on completion with either a direct honorarium in a fixed amount (something modest enough it's not worth applying as a job), or a larger donation to charity of their choice. That realigns the candidate and employer experience by showing that the employer cares enough about the output to invest in it.