The important thing to screen a software engineer for is not knowledge but the strength of their problem solving and ability to build mental models of problems. Whiteboard interviews are a good way to evaluate these skills - assuming the candidate hasn't seen this particular problem before and the interviewer understands that this is what they're supposed to look for. Goodhart's law applies - the measure becomes a ta…
Ask the candidate to build a known quantity like say, a calculator, calendar, whatever or give them a bunch of code and have them modify it in some way or discover a bug.
Something closer to building software. Leet code is too far away from it and the performance on it too poorly correlated with actual suitability.