RayCast2D position doesn't change with its parent

Godot Version

3.5.1

Question

I want to change node’s position with attached to it raycast, and raycast needs to move with it. But the raycast is ignoring it and stays on node’s position script is attached to. Why is this happening?