When dragging an UI element, only the transform is modified.
This is a good behavior for most cases, but sometimes, we would like to move both the transform and the anchors instead of moving them manually one after the other.
This could be done by using an alternate key down (ctrl, alt or something else) or by using the "move" button (the one at the right of the hand button" in top left corner of the editor.
The "move" button acts exactly like the UI button at its right, it moves the transform. Perhaps you could use it to have a different behavior ?