I have a Dell monitor which has a built-in USB-C hub. I experience similar issues when plugging in my MacBook Pro - the monitor part works fine, but the keyboard/mouse usually takes a few attempts at plugging in ("docking"). Might not be your laptop so much as Dell's USB-C dock acting up.