There are really only a few actual physical differences amongst Model M/Windows and workalike keyboards. (i.e. I am not talking about things like Maltron keyboards.) Those are the differences between 101/104, 102/105, 103/106, 104/107, and 106/109 key keyboards.
Ironically, that's really all that looking at the keys next to the shift keys gives one. The 102/105-key and 104/107-key keyboards add a key at B00, in between the left shift and B01. The 104/107-key and 106/109-key keyboards add a key at B11, in between the right shift and B10. So it's possible to detect the number of keys somewhat by seeing what USB HID codes come down the wire for "next to the shift key".
But this does not tell the computer anything about what is engraved on the keytops, and is not sufficient information for determining, say, Dvorak from AZERTY. (It's not even sufficient for detecting the 103/106-key keyboard, whose extra keys are on row A.)
Control/shortcut keys are bound to the physical key, not to the regional layout characters bound to them. The displayed shortcut is often shown as the one for the US/UK layout.
As someone that often switches from US layout for programming to local layout for a few national characters, I'd consider any other behavior to be incorrect.
(People using QWERTZ/AZERTY might not agree/don't switch layouts that much. I'd be really annoyed if location for Ctrl+Z moved around... This is why standard key for Undo on PC was Alt+Backspace, which I still often use).
There's no reason that would have to change. If the OS was aware of both the key's physical location and what character it was supposed to represent it could easily keep the same physical mapping while simultaneously displaying the correct characters for that mapping.
I know that "media keys" (e.g. a Calculator button) aren't actually keys but another kind of USB HID device hanging out on the keyboard like a Touchpoint mouse; but F1-F12 keys really are keys, events sent from the same device that sends regular keysyms. Are they just random non-positional codes hiding out outside the ISO 9995 reserved range?