Not directly because it can't handle retransmitting the existing HDMI signal. You probably need to add a HDMI/DVI switch IC like this one: https://www.analog.com/en/products/ad8196.html
I've tried a few commercial hdmi switches, to share a monitor between machines. The switch time is long and the monitor doesn't reliably wake up. Perhaps it's related to eDID?
Do you know how that chip is for real-world usability?
> switch time is long and the monitor doesn't reliably wake up
In my personal experience, obtuse monitor's firmware is often to blame.
Using a switch with one extra input port, where all data pins are connected to ground (via series resistors), and switching to that port for a brief moment, before switching again to the real intended input, usually helps some.
Isn't it possible to create a valid and stable HDMI signal based on two inputs? I can imagine that some memory is required to synchronize both signals. Is there an IC that can do that?