The potentiometer could have gone out of range when you lifted the arm. The sensor is supposed to have a lock to prevent that, but it is easily broken. The result is that the values go wacky and usually cycle back to the beginning. The easiest way to check for this is to what the values of the potentiometer at different heights, lower, low, medium, high, higher, etc.
If the sensor is being reset or reaches the min/max before you want it to, try rotating the sensor to get desire results. If the range of the potentiometer (260°) is below your shaft range, you’ll need to move the potentiometer to a shaft where it’ll work.