How to fix this code for opening a menu?

Help me please. I wanted to implement the function of opening the menu using the escape key, but when starting the game and starting a new game, instead of the gameplay scene in which the game should be located in the future (where the menu was accessed using the escape button), the following error appeared: Invalid call. Nonexistent function ‘hide’ in base ‘Node’. What to do?
Here is the code for all three of my scripts: main menu, gameplay and menu:

extends Label

func _ready():
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):

func _on_button_pressed():
	get_tree().change_scene_to_file("res:// Gameplay.tscn")

func _on_texture_button_pressed():
	get_tree().change_scene_to_file("res:// Gameplay.tscn")
extends Node

var escape_panel

func _ready():
	escape_panel = preload("res://Escape.tscn").instantiate()

func _input(event):
	if event is InputEventKey:
		if event.scancode == KEY_ESCAPE and event.pressed:

func toggle_escape_panel():
	if escape_panel.visible:
		escape_panel = preload("res://Escape.tscn").instance()
extends Panel

func _ready():

func _on_QuitToMenu_pressed():
	print("Quitting to menu")

func _on_Settings_pressed():
	print("Opening settings")

func _on_Resume_pressed():

func resume_game():
	get_tree().paused = false

I’m not to good my self but I suggest you use a input map instead of finding the key. The reason I say this is because it’s easier to change and allows for multiple platform compatibility. This is a good video for input maps

This looks bad you created the panel and queue free it immediately before adding it as child, why? … although that isn’t the right function?

Otherwise not sure why you are getting that hide error.