Stuck in no mans land

So I managed to do this to myself, and I haven’t saved in a while… anyway out of this?

You could try blacking out by fainting all your pokemon with the local encounters or the dex nav’s memory chamber.

If you have a Pokemon with Fly,you can fly back to Gaia Town.If you have the Pikapad,you can use that.