I too have been experiencing this problem recently. In fact, I am typing on my new BT keyboard as I thought my old one was going flaky. I bought a new one and found the issue remained.
I am running High Sierra 10.13.2 with VMware Fusion 10.1.0 with a Logitech K380 BT keyboard and a Logitech M705 mouse with a USB dongle. It also happened while using my first generation Apple Wireless Keyboard.
This has been driving me absolutely bonkers. I have implemented the mks.keyboard.setHostLEDs=FALSE to the config file, and in the short time since then, I've not seen it happen. Fingers crossed.