Shadow Tag prevents all foes from fleeing (including Teleport) or switching out.
Using a switching move like Baton Pass or U-turn or holding a Shed Shell, will allow the Pokémon to switch out. Having the ability Run Away or holding a Smoke Ball will let the Pokémon flee. Shadow Tag does not apply after a Pokémon faints so if it is used by a wild Pokémon, it is possible to run away then. Shadow Tag does not affect other users of Shadow Tag. In the sixth generation, Ghost types are now immune to its effects.