When I used to interview developers, I was more interested in how they approached problem solving and working collaboratively than attaining any correct answers.
So I'd split the interview in two parts. The first bit I'd give them a set of requirements and ask them to come up with a design for it on their own. They had internet access and technical references available. It wasn't a memory test, and I'd leave the room (this probably wouldn't work well now given LLMs).
In the second part, I'd ask them to talk me through their design, and then explain we were going to change the requirements and work together on altering it to accommodate them.
The second bit was the most useful part of the interview; it's what we needed to do in the actual job, and pretty much everyone we hired in that process was good.