I have the ugreen USB switch - does what it says on the box, not had any issues with it. I've not tested if it can actually get the fast USB throughput that it advertises, I only use it with keyboard/mouse.
- I'm fairly sure it won't let you switch which computer "sees" your dock. I use mine by connecting both my dock and my PC to my monitors (2x DP inputs, so I can manually switch what signal I see), then connecting the USB switch to both the dock and my PC, then keyboard and mouse to USB switch. As others have suggested, a KVM switch would be simpler, but getting one that supports 2x 4k@60Hz outputs is expensive