I’ve played with a similar concept. Most recently with a frog’s tongue. I also tried it with a grappling hook like in Zelda.
The key is to put it in the center of a start and end position. You can use a tiled or a panel sprite. The benefit of a panel sprite is you can have fixed ends and just lengthen the center part.
I used a tween and calculated the time nased on distance to keep the speed consistent whether it was short or long.