Hello there,
Have you made any recent updates that you are aware of on this device? If so try uninstalling them and check if this sorts out the issue
Please log off the session instead of disconnecting to see how it works.
By default, the remote session will use the same keyboard locale as the OS you're running the client on. (If your Mac is running an en-us OS, that will be used for the remote sessions as well.) If the OS keyboard locale is not used, check the keyboard setting on the remote PC and change it manually.
Similar discussion here https://learn.microsoft.com/en-us/answers/questions/89547/remote-desktop-connection-from-macos-keyboard-layo
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–