You’ll need to have a mechanism to manage which menu is visible. In the code you posted, you’re creating a new instance of the menu each time the associated button is pressed. If you’re going to do that, you could simply queue_free any existing menu instance(s) prior to creating the new one.
Another idea would be to simply create a single instance of each menu when the scene opens and set their visibility to false. Then, instead of creating the menus on each button press, you’d simply set the visibility of the appropriate menu to true and the visibility of the other menus to false.