There’s an app called Synergy that lets you seamlessly move mouse and keyboard input between devices, if you ever feel the need to run the Mac and the Windows machines side by side rather than using a KVM switch.
I use a USB switch connected to both displays for my input devices so I can switch between screens/computers: https://a.co/d/ckNXGpt