Quick answer: Godot 4 Control._gui_input handling an event but the event still propagating to the tree? Accept the event via accept_event() to stop propagation.
Modal panel processes click; click still triggers gameplay actions underneath.
Accept the event
func _gui_input(event):
accept_event()Stops propagation. Gameplay doesn't see the input.
Or use Control.mouse_filter STOP
Default on most Controls; STOP intercepts. Verify; some Controls have it as PASS.
Modal layer trick
Modal panel is full-screen with mouse_filter STOP. Catches all clicks; gameplay safe.
“Events propagate by default. Stop = explicit.”
Build a modal panel template with all the right defaults. Reusable; bugs avoid.