Handling mouse drag events between two controls

Godot Version

4.7

Question

A situation I’ve run into a couple of times without finding a “good” solution to is handling mouse drag interactions that start in one Control “A” and end in another Control “B”:

With regular mouse events (like click, moves etc) each Control gets the corresponding InputEventMouse via gui_input based on the position, mouse filters etc. So if you click a control or move the mouse cursor over it, this control get this event. However, with drag operations there’s a exception to this rule. So if you click down in a Control and start dragging, this control will keep getting the mouse move events sent to it even if you drag out of the control and into another. This is often desirable, but in this case it means if you start dragging in control A, control B will not get any mouse input events even if you drag into it.

I’ve solved this in the past with various workarounds, but they all feel like hacks (for example forwarding the drag event from one control to another via calls, or having a higher level parent handle dragging for both).

So I’m wondering if you know of a good proper solution to this situation?