11.5 Caps Lock lag
I encountered a new issue with my MBP 15 2017 recently, presumably after updating to 11.5 (and it stayed after the 11.5.1 update). It doesn't appear right after restarting, but rather after a day or two, which complicates troubleshooting a lot.
Whenever I press Caps Lock (which I used to switch layout) the Mac freezes for a couple seconds, the result is unpredictable (it may switch the layout, or turn caps on, or do nothing). I still can move my mouse during the freeze but can't type or scroll.
This behavior persists when disabling Caps Lock layout switching, disabling Caps Lock completely, closing the apps that may affect the keyboard. I've noticed that as soon as it starts, it also adds a lag to increasing/decreasing volume, and, what is worse, to switching between apps (even when just using a mouse).
Overall it makes me reboot my computer every couple days. Resetting SMC and NVRAM doesn't help. I've searched and found some other questions like mine posted lately, so I'm not the only one encountering this issue, and it's highly likely to be introduced in 11.5.
Any ideas how this could be fixed?