Good KVMs, specifically the ones from Level1Tech[1], are smart enough to keep all monitors connected virtually so all your windows stay in place when you switch back and forth between machines. There is no delay of plugging devices in because from the perspective of the client PCs the USB/display port devices were never gone. Of course you can connect a bunch of peripherals to a dock and switch the upstream thunderbolt connection, but that doesn't work correctly.
Crappy KVM solutions are easy. Good ones are hard.
Crappy KVM solutions are easy. Good ones are hard.
[1] https://www.store.level1techs.com/products/hardware (no affiliation)