on a side note - if employer does not want to wait and wants to rush the hire chances are you don’t want to work there anyways…
Nobody in their right mind is waiting on 1 candidate for several weeks to maybe hear from them unless there aren’t other good options.
And unless you’re notorious and exceptional, there are a lot of good options in the stack of resumes right now.
It is different than traveling to a different city for an onsite because you're not wasting your teams time on a candidate unless you think they have a good chance of getting to the end. You have "skin in the game" as they say.
If hiring managers were only issuing homework to candidates already scheduled for a full round of interviews, so interviewers have standardized material to talk about and as a substitute for whiteboarding, it wouldn't be so bad. Instead you mostly get nothing to show for your time and when you do get a round of interviews nobody looks at what you did and wants you to do medium+hard leetcode on the shared screen.
And then you're still nervous and have to explain your thought process around everything you're doing as you're coding.