Hello.
This is probably not a bug - just a feature of the docked mode which checks frequency used by the displayed.
The game locks at 30 FPS when the display runs at 60 Hz to have matching frame rate with the frequency.
The game locks at 40 FPS when the display runs at 120 Hz.