Pause menu reappears when I jump?

Godot Version

4.2.2

Question

I started using Godot a couple of days ago and began by making my first game by following YouTube guides etc. and so far it’s been going well. However, I ran into a problem when I was trying to implement my pause menu. The menu works as intended however after opening the menu pressing resume and then jumping in-game, the menu appears again and fades away. I use 2 key binds for jumping, one of them is W the other is Space and the menu only appears when I jump with space. My assumption is that after I click on resume, the button gets focused (because in that appearing and fading motion, the button has a white outline) and because I press Space it thinks I pressed resume again. Just in case I will attach the script for the pause menu, however I doubt the problem is there.

Edit:
While trying to take a screenshot of the fading-away menu, I realized that I could still click the buttons on the menu even though the menu itself wasn’t visible. WHICH IS EVEN MORE CONCERNING PLEASE HELP!

Screenshot 2024-05-06 021019

I see that you have an animation for the menu. I assume you’re only animating the transparency of the menu, and transparent elements can still be clicked.

I believe that you should set visible to false on the elements you want to be unclickable. Setting the visibility of the parent should suffice.