i found out the problem i needed to manually change the position of the rectangle in the popup_menu using this code :
func process(delta: float) -> void:
if Input.isactionpressed("Esc"):
var popuppause = getnode("escmenu")
popuppause.rectposition = Vector2(-76,-63)
popup_pause.popup()
for some reason it won't go past the half of the screen, for example if is set it's position to 0 , 0 it will be the same as -40, -40