So i found a better solution i get the end of my canvas transform
get_canvas_transform() then get the position on the end of my canvas to the origin
var ctrans = get_canvas_transform()
var min_pos = -ctrans.get_origin() / ctrans.get_scale()
position.x = min_pos.x
i got the code for finding the camera end position from this question https://godotengine.org/qa/13740/get-camera-extents-rect-2d
so now instead of checking if the player is in the area2D for the wall to move the wall will just move if the camera moves.