How to keep video signal when switching inputs?

Recently i’ve got a secondary machine (desktop), that i will use plugged in the same monitor of my work machine : work machine on HDMI, secondary machine on Displayport.

It works but problem is, when i switch from Displayport to HDMI, and go back to Displayport, no signal is shown on my monitor, UNLESS i plug out and plug in the Displayport cable on my secondary machine…

Is there a Windows 11 setting to avoid this ?