Zone enchantments such as Sacred Ground and Fortified Position grant you their benefits as long as you are in the same zone as them. If you move, either by a move action, push, or teleport, you follow a series of steps outlined on pages 12 and 13 of the FAQ. You do not enter the new zone until Step 4.
Thus, for Steps 1, 2, and 3, you receive the effects of any zone enchantments that were in your starting zone. Step 3 is when passage attacks occur from any walls you may be passing through (this step is skipped in the case of teleports). Upon Step 4 however, you lose all of the effects of the zone enchantments that were in your starting zone, but you gain any effects of zone enchantments in your new zone.
Even though walls occupy a space outside of and in between zones, creatures never do. They are always considered to be in one zone or another.