Hey uhhh every time i go back into the dream realm i get glitched because i lost a battle while in the dream realm and was transported outside of the dream realm to a pokemon center and whenever i go back in it glitches me…so how do i get unglitched?

Swap your save to a backup that was before you lost.

Will it mess up my progress if i do that?

Just whatever happened after you lost, assuming you saved right before the fight you lost.

Well i recently saved as I’m entering the erebus city so now whenever i go into my game and try to play it does the glitch

Go back to the latest one: the one with the 3 at the end. If that doesn’t work, then you may have to start fresh.

I’ve tried going to save file 2 and 3 but it just pops up with new game and whatever

Nonono, you have to rename the files to the same thing as your primary save and replace it.

How do i do that?

Something tells me you didn’t read the post I linked above.