With GLFW_CURSOR_DISABLED the official GLFW backend keeps feeding virtual unbounded cursor coords to ImGui each frame, so hover state wanders across hidden panels while the physical cursor is invisible. Append a "mouse left the window" pos event before ImGui::NewFrame whenever the cursor is captured - ImGui treats the frame as mouseless.