Using VMWare Workstation 16 Pro 16.22 build-19200509, running on a Dell XPS laptop with 2Tb disk and 64Gb memory. The guest VM is CentOS7.
What is happening is that typically after compiling code (i.e. lots of file read/writes), the VM will lock up and not respond to keystrokes for a second or 5. And when it does it often is accompanied by repeating the last character typed anything from 1 to many times.
Is this a known problem? I don't see it on another WIndows box running VMWare Workstation 15 Pro.
I don't know if it is possible for you but can you try something lightweight like xfce or even icewm?
If that's not possible try disabling any windows effects and test. There is something that creates interrupts that VMware doesn't handle well. Shows up pretty readily with KDE. I have found that on some VM's that continuously moving the mouse keeps the freezing at bay. Not realistic to do in real life but it does provide some clues as to what is going on.