It works fine with my Dvorak Programmer layout in "ViewKeyCode" with default configuration (no auto-detection, no specific layout selected). I'll apply the patches in my local proton build and see if I notice anything during my usual gaming.
I'm not sure I'm capable and confident enough to review the code, but do I understand correctly that without "scancode auto-detection" it uses the fixed offset, and that the selected layout then only affects vkey mapping for non-US keys? I.e. using a Russian keyboard layout with an incorrectly specified layout in winecfg will assign random vkeys to letters but numeric 0-9 will be VK_0-9 as the latter are the same on both US and Russian layout?
I think if I stumbled across the "Enable keyboard scancode auto-detection" option I would think it's a desirable thing even when not using VNC. Maybe something like "Enable keyboard scancode auto-detection (Use when X11 sends incorrect keycodes, for example when using non-US layouts with VNC)"? Although this would make it a rather long description. I don't know how many people open winecfg and click random things, so it might just be a non-issue anyway.