There are unfortunately a number of separate issues being reported here I think.
Some of these things have already been noted here, but he's my recommendations for things people should try:
(1) Disable Hyper-V on the Host
(2) Disable the E cores on your system
I'm not an expert on the CPU side of this, but my understanding is that both of those things will put you on some different code paths that are triggering performance issues or intermittent stalls for some users.
(3) Disable Guest Sleep/Hibernate/PowerSave
Recent versions of Ubuntu are being more aggressive at putting the Guest into Power Save modes and engage Sleep or Hibernate when the screensaver engages. This is sometimes provoking keyboard hangs that then don't restore when the Guest wakes up again, or fails to trigger a wake-up via the keyboard.
(4) Power off the VM, and add the config option: keyboard.allowBothIRQs = FALSE
This might make the Sleep/Hibernate hangs worse, but seems to avoid a different keyboard hang that people are hitting during normal keyboard usage.
(5) Make sure the VM has a USB controller.
This gives us an alternate mouse path which is generally better behaved, and helps reduce the traffic on the PS/2 port decreasing the chances of hitting keyboard hangs there.
(6) As a last resort, you can try switching to the virtual USB keyboard for the VM.
After making sure the VM has a USB controller, power off the VM and add this config option: keyboard.vusb.enable = TRUE
That will switch us from sending keyboard events using the PS/2 keyboard to the USB keyboard. On some Linux distros this may make your key-repeat get stuck more often, but again avoids any PS/2 keyboard hangs you might be hitting. This is however unlikely to fix any general host performance issues (if the host is stalling or generally slow on it's own), and is a less common configuration.