I also have the same problem expressed in this thread:
Alternating case text
When local CAPS LOCK is disabled, remotely it is and writes “AAAAA”; when locally it is enabled, remotely it writes “aAaAa”.
My situation is reverted as I use Linux as a client to remotely control a Windows 10 PC.
The Linux Box uses x11 (Linux Mint 21.3 Cinnamon 64 bit) running NoMachine 7.14.2.
To be honest I’ve been able to solve this in the past, but I can’t remember how, ATM. I’ve tried disabling the local server (normally unused) and several options but with no success.
Obviously, if I’ll remember how I did solve in the past, I’ll report the solution here, for everyone’s convenience.