Performance wise, pinning is more or less the same as moving or updating the position every tick, don't worry about it.
While it is commendable to try to avoid every tick events whenever possible, it is indeed often necessary and suitable for certain purposes, such as displaying/updating the position of a moving object smoothly.
If you wanted to waste time optimizing, you could add an additional condition and variables to keep track of past x and y position to compare with to check if the position of the player actually changed before running the action to update the location of the health bar. But that would be silly. (Don't do that.)