Uhhh helpp

So my Pokemon won’t follow me after I fainted all my Pokemon on purpose because I was trapped and that was the only way to get out. But now it won’t follow me! I pressed every button, healed, and even tried to start battling, surfing then not surfing to see if they appeared, put the pokemon in the PC then taking them back out. It won’t work… helppp.

Losing a battle again has worked for some people, along with using the pokepon perhaps.