retroshark it helped me, however, when I go to pause again, the menu is not displayed, as I understand it, because I hide it in the pause code hide() how could I put $CanvasLayer.visible = false from the pause code?
pause code:
func _ready():
show()
func _process(_delta):
pass
func _on_resume_pressed():
hide()
get_tree().paused = false```