This is a long-standing bug. I have two docks on my secondary monitor. Every time I install a new NVIDIA graphics driver, both docks move back to the primary monitor. I have to manually select Settings -> Position -> Change monitor -> Monitor 2
Usually, that is not enough as sometimes their position remains reset to the primary monitor after the first restart, and the procedure needs to be repeated.
This is on Windows 10 Pro (21H2) with RTX 3080 GPU, newest drivers (was happening with every driver installation).