When I set a float with a "set by ref" the value breaks when I change target

When I set a float with a “set by ref” the value breaks when I change target. Why? Is this supposed to happen? Is there a way around it, so I don’t need to keep reconnecting them? Or is there another way to set this?