Intermittent input delay on keyboard (MacBook Pro 2018)
Solution 1:
I think I remember a problem from long ago related to the Dock. Try opening /Applications/Utilities/Terminal, then executing "killall Dock" (It comes right back). This may just be a workaround and you might have to do it whenever you experience the problem.
Solution 2:
Yes, the keyboard lag exists, you're not imagining things … nor are you the first to notice this behaviour. This fluctuating-delay happens because there's a T2 chip in the way, and the keyboard and trackpad are processed by the T2's own BridgeOS first before reaching the rest of the system that macOS can see and have influence over. Oh, and before you ask, using a Bluetooth keyboard is not going to be faster.
Sadly, until Apple actually acknowledge this additional annoyance caused by the T2, nothing will be done about it.
Solution 3:
Just to add to this - my lag was actually the bluetooth keyboard which I use separately - the battery level was at 52% but plugging it directly in instantly resolved the keyboard lag issue.