- Edited
this is how my game tree looks like: the Canvas Layer and pause element have the process set to "When paused"
here is the code:
if event.is_action_pressed("pause"):
get_tree().paused = true
$CanvasLayer.show()```
there are no mistakes