I've been thinking about your scanner. I do like your idea of the surrounding box - that sounds like it'll bypass a lot of scanning issues eg ensures the phone is perpendicular to the scanner, a fixed distance away (in focus), oriented approximately correctly, and steady rather than shaking.
Scanning occurs inside a small box for direct sunlight effects. And the focal distance on the scanner does not have much margin
Focal distance, or field of view? As long as the entire QR code and surrounding quiet guard area is captured by the scanner's camera, the size shouldn't matter too much, as long as the pixels are large enough to be distinct. I saw something about a minimum size of 25 mm square, but in real life I've seen QR codes say 10 mm square, admittedly with fewer
blocks (or whatever the QR pixels are called) modules.
I'd expect that the first thing the scanner algorithm would do is locate the three square bullseye alignment markers, from which it can determine the module size and QR code orientation, and regularise the captured image accordingly. It doesn't feel like it would matter if the QR code was 25 or 31 or 37 mm or whatever.
Edit: when AI works, it's great