The layer transform tools will move the entire shape layer. The shape transform tools move the shape. The gradient positions are based on the layer not the shape so moving the layer will move the gradient but moving the shape well not.
If you are talking about the gradient ramp the effect that is a whole other story.