To practice programming menus, I'm making a simple little text adventure game system. The player is presented with multiple choices at the bottom of the screen which, when I get to it, will move them from scene to scene or have other effects. The player can move between and select the choices with keyboard or controller inputs, or they can click on them with the mouse (invisible buttons are laid over them).
I'm having a weird issue, though. If you use the keyboard/controller inputs, everything works fine. If you use the mouse, everything works fine. However, once you click on a choice with the mouse, the "confirm" keyboard/controller input breaks (though using the mouse still works fine).
In its broken state, the "confirm" input also triggers a sort of phantom mouse click - the game takes the key press and also, for some reason, treats that key press as a mouse click on the last in-game button the mouse hovered over. With the buttons' action mode set to release, this phantom mouse input is taken as the key is released, as if it were a mouse button.
I've been able to sweep the issue under the proverbial rug by having the GUI script (which is listening for keyboard/controller inputs) tell the button nodes to ignore mouse clicks when the player is using the keyboard or controller - they start acting on clicks again once the player moves the cursor over them. (This disabling behaviour is itself disabled in the project file I've provided so people can see the issue first-hand.)
That doesn't help me understand the problem, though. Has anyone else ever run into this issue? Why is the game taking key presses as mouse clicks?
Normal behaviour:

Broken behaviour, using keyboard/controller to make a choice after having made one with a mouse click:

Very much open to critiques of my ham-handed noob code, by the way, if anyone has any suggestions for how it can be improved.