Change your preferences here.
Enemy Pokémon cannot switch out. Pokémon can escape by using Baton Pass.