L1Tech KVM - issue with computer with multiple monitors

Trying to see how this can be resolved. I just got a l1tech 2 port DP KVM yesterday. Setup was fine and it works except…when I switch away from my laptop (which has a dock) the windows and everything move to another moninor.

My setup is as follows:
24" Koorui 1440p monitor
Desktop with a 4090, single monitor.
HP Z book laptop with HP dock, 3 monitors

The desktop is fine, when I switch away from it, nothing happens to anything on the desktop.

The laptop, the monitor that switches is in the center of the 3 monitors I have. 2 side monitors are portrait mode. When I switch away from the laptop to the desktop, everything, regardless of what monitor it was on, moves to the new monitor that windows thinks is the main. It acts as if I just completely removed that monitor from the setup. When I switch back, windows puts the monitor layout back but none of the windows. This is an absolute deal breaker for me. I have way to many windows open on my work machine to deal with moving things around all the time.

HP dock has 2 DP ports and VGA. All which are used. I have not tried to see what happens if I plugged it in to the laptop’s HDMI port using an adapter but that kind of defeats the purpose of the dock.

I did try really ridiculous things like using a DVI cable with DVI to DP adapters at both end, obviously does not work at all.

I tried doing some of those regedit things with the simulations to see what would happen, it didn’t help. I thought this KVM had all the EDID stuff built in so this wouldn’t happen? That was a question I specifically ask.

What causes this to happen? the dock? Cable? How do I fix it?

i found a really silly work around, it is not ideal.

I plugged in an HDMI cable from one of the HDMI ports on the monitor and plugged it into the HDMI port on the laptop itself. Deleted all the monitor configs in the registry, restarted. Layout all the monitors and windows again. Plugged inthe DP cable from t he KVM to dock.
Setup the two connections as a clone.
restarted computer.
it works now but thats still stupid. I guess when I switch it moves all the windows from the cloned stuff back to the HDMI connection then puts it all back when I swtich back and the DP display shows back up.

Windows 11 has a checkbox to be the behavior you want Google restore window positions or see the kvm faq

Windows 10 you can use the persistent windows utility And that also works well