Docking, Viwport: Fixed a regression in 1.92.4 where partially moving a floating docking node with split over the main viewport would set the window in an invalid state.

This was revealed by better merging in dfe308b (#8948) but isn't technically caused by it.
Added a agressive assert in UpdateTryMergeWindowIntoHostViewport() For good measure.
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 62f2def..1fa07fe 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -245,6 +245,10 @@
   - Demo: rework 'Dockspace' demo to increase clarity and put more emphasis on the
     basic path of simply calling `DockSpaceOverViewport()`.
 - Viewports:
+  - Fixed a regression in 1.92.4 where partially moving a floating docking node
+    with horizontal/vertical split over the main viewport would set the window in
+    an invalid state in some situations, making user unable to further interact
+    with the window.
   - Fixed a regression in 1.92.4 which could cause combos/popups window from
     appearing under their parent viewport if their geometry overlapped the main
     viewport. (#8948, #9172, #9131, #9128)
diff --git a/imgui.cpp b/imgui.cpp
index 547aeff..8319700 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -5365,7 +5365,7 @@
         // Try to merge the window back into the main viewport.
         // This works because MouseViewport should be != MovingWindow->Viewport on release (as per code in UpdateViewports)
         if (g.ConfigFlagsCurrFrame & ImGuiConfigFlags_ViewportsEnable)
-            UpdateTryMergeWindowIntoHostViewport(window, g.MouseViewport);
+            UpdateTryMergeWindowIntoHostViewport(window->RootWindowDockTree, g.MouseViewport);
 
         // Restore the mouse viewport so that we don't hover the viewport _under_ the moved window during the frame we released the mouse button.
         if (!IsDragDropPayloadBeingAccepted())
@@ -16553,6 +16553,7 @@
 static bool ImGui::UpdateTryMergeWindowIntoHostViewport(ImGuiWindow* window, ImGuiViewportP* viewport_dst)
 {
     ImGuiContext& g = *GImGui;
+    IM_ASSERT(window == window->RootWindowDockTree);
     ImGuiViewportP* viewport_src = window->Viewport; // Current viewport
     if (viewport_src == viewport_dst)
         return false;
@@ -16576,6 +16577,7 @@
     }
 
     // Move to the existing viewport, Move child/hosted windows as well (FIXME-OPT: iterate child)
+    IMGUI_DEBUG_LOG_VIEWPORT("[viewport] Window '%s' merge into Viewport 0X%08X\n", window->Name, viewport_dst->ID);
     if (window->ViewportOwned)
         for (int n = 0; n < g.Windows.Size; n++)
             if (g.Windows[n]->Viewport == viewport_src)