That's because, as indicated in the docs, you cannot change a rigid body's position directly.
A rigid body is controlled by the physics engine, which calculates the forces on it, any collisions, and determines its velocity and position. This is the point of using a rigid body, so that you don't have to do all those calculations yourself.
If you're trying to control its movement, then you have to apply forces.
If you want to do a one-time change, like a teleport, then you can do that by directly altering the physics state in _integrate_forces()
.
For more information, see the RigidBody2D docs at:
https://docs.godotengine.org/en/stable/classes/class_rigidbody2d.html