It keeps its distance from the caster
First, the relevant passage of the spell description:
The hand moves to stay between you and the target, providing you with half cover against the target.
As the question asks primarily about radial movement (towards or away from the caster), I won't go into the hand's angular movement (around the caster), which should be pretty obvious anyway.
Given 5e's culture of "Spells do what they say they do, no more, no less", I would argue that if the target moves towards the hand when there is still space between the caster and the hand, it is nevertheless still "between you and the target", so there is no need for it to move. It won't retreat towards the caster.
Now, the hand has a strength score of 26, which is extremely high. If the target still has a score even higher than that, it can move through the hand's space (albeit at double the movement cost, and keep in mind that the its size is large). Your DM might now rule that the hand then moves around the target, which would effectively turn the entire path towards the caster into difficult terrain and grant them half cover even against a target with a strength score higher than that of the hand. If that was the intent, the spell description could simply mention that moving against the hand requires a higher strength score and costs double movement. Instead it explicitly describes rules for passing the hand, not to mention making it extremely difficult to do so. Therefore the intent is probably that once the target passed the hand, it is free to "ignore" it for the rest of its turn.
I personally would justify that decision such that once the target has passed the hand, it is a step ahead and can move further towards you without the hand catching up.