MBP built in keyboard unresponsive until complete shutdown MacBook Pro (Retina, 15-inch, Mid 2015), running macOS Catalina 10.15.5.
Sometimes while working, the built-in keyboard becomes completely unresponsive, the only button that works is the power button. Logging-off, sleeping etc. does nothing, only shut down and fresh boot (with the chime) removes the issue.
While the issue is happening, the Caps Lock light is turned on.
Touchpad works fine, and plugging external USB keyboard also works (but doesn't unlock the built-in keyboard).
Mouse Keys, all this stuff is turned off.
I noticed, but have no proof, that this happens when I'm pressing various left-side modifier keys: shift, alt, ctrl, cmd, tab.
Is this a hardware issue? A software issue? A hidden shortcut? Is there some kind of logging that can be turned on to watch for this kind of things?
This is a hardware issue and more than likely you need to have the keyboard (top case) replaced.
The keyboard is on the USB bus; if you look for it in the device tree of the system report, you’ll find it there.  The fact that it stops working after a while says yo have a failing component - what exactly is impossible to know without putting hands on with proper diagnostic gear.
We know that it’s not your USB bus because you can plug in a different keyboard and it works - so the USB bus on your logic board is fully functional.
Hidden shortcut?  No.  With all of its complexity even modern computers are still pretty binary - it either works or it doesn’t.  There’s no setting to tell your keyboard to only work for a little while then stop, then start again after a reboot. Hardware functionality becomes intermittent when it’s in the process of failing (or failed).
You mentioned that the issue happens when your Caps Lock key is engaged.  If so, you may have narrowed down the issue however, the resolution is still, unfortunately the same - replace the keyboard.
Keyboard key stuck or not being recognized; how to fix