From the perspective of someone currently searching for candidates: I decided to give applicants a homework that's supposed to take about two hours to do, and schedule the next interview a week later to discuss their solution (remotely).
For example, for the senior frontend engineer, I think we went with "create a real-time comments panel using SSE that works in multiple browser tabs", and created a ready-made git repository with a dev server that includes the SSE endpoint. That way, they only had to focus on the actual task.
Now I thought that was nice because it should be very easy to solve for someone with a bit experience, but we get lots of opportunities to discuss their choices and the technology. It's hard to confidently bullshit an answer to if you think server-sent events or web sockets are superior, and why. So from everything we tried so far, this format gave me the most accurate impression of someone yet.