“So instead of writing code, consider instead having the candidate read existing code and talk about what it does and how it works.”
Whiteboard puzzles test memorized answers and nerve, and the same questions circulate online. Nobody sketches code on a whiteboard at work. Most of the job is reading code someone else wrote, badly, years ago. Interview for the job you are actually hiring for.