A unit that flees from inside a building is placed outside directly opposite the assaulting unit and it then makes its fleeing move as normal - the building does not slow them in any way. Fleeing units otherwise treat all buildings as impassable terrain.