Focus issues during drag and drop between different windows/viewports

Godot Version

Godot 4.5

Question

I have a main window with a subviewport and a “world” and some (embedded) windows with their own “world”.

I want to be able to drag elements from one to the other. The transfer between these worlds does work. I used the on_mouse_enter to move the elements from one subree to the other.

The problem that I have is, that the mouse motion is not tracked further once I moved into the window (or if I started inside, if I move out).

After clicking into the surface it behaves as it should, so Iam quite sure it is some focus problem.

If I set the window to “unfocussable” it works but this brings up other issues (like missing resize cursors).

example1

I tried to manually move the focus to the window with grab_focus() but this did not change anything.

The scene that is inside the viewports and that handles the mouse events is based on an Area2D