So if you use the lower layout, there is no issue and everything registers as shown, but if you change any key, there is an issue? Have you tried just changing one key at a time to see if it makes any difference? As in only change one from the 1,2,3,4,5,6,7 to the desired key at a time, and then back to the number to test the next key. If it randomly has issues with just those keys, there may be an issue with the QMK firmware for that keyboard.
I think the issue is firmware based as this isn't a logical issue with any hardware.