I get a resized display on my second monitor after switching my KVM to a different input.
To avoid resizing, you can save the monitor's EDID data to a file then load it onto the other DisplayPort output. The details vary between graphic card manufacturers. Please contact the manufacturers for more information. The below link is the how-to by Nvidia and Intel.