This is a Mac-specific problem.
We have an application with main window, MDI area, main tab bar at the top, and some dock windows. Several of the dock windows are locked to free-floating state, and these are not problematic. On top of this, we have four dock windows that are docked to the left in the default application state (but also allowed free-floating or docked to the right). On Mac, it has always been more or less impossible to re-dock one of the four if (willingly or accidentally) dragged to free-floating state. The only practically possible fix for misplaced dock windows has been to restore all user-made settings and go back to the default application state, which is far from always OK with the user.
This problem has been around with the same symptoms at least since Qt 5.5 and at least for Mac OSX versions 10.10-10.13.
This is the core problem that we need a fix for here, though we have made other observations when trying to use what measures there are in Qt APIs to limit the user sufferings from this buggy behavior - further comments follow in that direction...