Connecting rigid body to animated object

I’m trying to attach a rigid body to an animated object, using a spring joint. This works when the animated object is positioned at 0,0,0, but if I move it, the connected object still behaves as if it is connected with a rigid body at 0,0,0.

How do I solve this?

edit:
nm. I had missunderstood the behaviour of the joint. It tries to keep the distance it has when created.

The “target” position of the Spring is determined by the relative position from the Anchor to the Connected Body (or the world) when the Spring Joint is created

what are you trying to achieve? now is this animated on a 3d app? normally when using the rigidbodies and specially joint you want to turn off the animations. now in your case as you mention that the object is staying at that position is because joint are like parenting inside unity the difference is the behavior such as doors swinging and so on, maybe you might want to move the parent rigidbody of that joint instead.