Quick answer: Godot 4 Control with focus_mode = ALL trapping all keyboard input after a popup closes? Focus is sticky - call release_focus on the popup before closing.
Modal popup closes. Game keyboard input ignored until you click somewhere else.
Release focus
popup.release_focus()
popup.hide()Release before hide. Without it, the focus stays attached to a hidden node and consumes input.
Set focus_mode appropriately
For popups that shouldn't trap input on close, focus_mode = NONE. Less convenient for keyboard navigation but no trap risk.
Debug with focus arrow
F-key in editor toggles focus visualization. Lit-up nodes have focus; helps identify which node is trapping.
“Focus is a sticky state. Visibility doesn't release it.”
Build a 'CloseAndDefocus' helper for modal UIs. Encapsulates the pattern; bugs don't recur across new menus.