They move the shortest possible distance. That might mean they lowcrawl under the tank that is 'shocking' them, it might mean they leap over one of the tanks forming the box. Reality is suspended and they get out of the way.Lets say I box my opponents squad in with rhinos, then I tanks shock the unit in the single open part of the box . If they pass there morale test technically they can't run away but what would happen to them