[DF-5161] Fixed assert with dragging MainWindow between monitors.