It works on a per-program basis if you set it up nicely, but (afaik) it's not possible to get the docking station work nicely. The problem is that to drive external displays, you need the discrete GPU (esp. for UHD displays). Therefore whenever you dock it in, it should start driving the external display with dGPU, etc.
I've not seen a single successful attempt on getting this working (this = hybrid graphics + docking).
I've not seen a single successful attempt on getting this working (this = hybrid graphics + docking).