When you punch a villager, it would run away from you until it reaches a distance and calm down so chasing it is actually possible.
I have my own solution for this where a baby zombie is constantly teleporting near you or above your head and iron golems and that zombie are on the same team so it wouldn't bother to attack it.
I would like to know if there are other possible ways to make villagers run away from you relying entirely on commands. If possible, no visible zombies are allowed.