I had a similar issue, but I chose to solve it another way.
I connected both computers directly to the monitor and used lunar[0] to use a keyboard command to switch inputs. I then used a Deskhop[1][2] to share the KB and mouse between both computers.
It sounds awful, but in practice it was surprisingly nice. My monitor (LG Ultragear+) switches inputs fairly quickly. The process was something like this: hit the keyboard shortcut, then move the mouse off the left side of the screen. To go back, you reverse it: move the mouse off the right side of the screen and hit the keyboard shortcut.
[0]: https://lunar.fyi/
[1]: https://github.com/hrvach/deskhop
[2]: https://www.etsy.com/listing/1763041320/deskhop-jr-keyboard-...