I've had the exact same issue with my game data and i am currently on version 1.2.5.
Never mind, i managed to resolve this issue by installing a patch file for version 1.2.3 which glitched me behind the pokepon npc (inside the machine). Next, i ran the pokepon sequence again from behind the npc this time. This allowed me to get back into the town (with the item i won), where i proceeded save the game. Then i just reinstalled the updated version since the game was still glitched which i didn’t want and allowed me to continue the game as normal.
Alternatively, you can use a pokemon with fly to get out of the area behind the npc which will most likely be more reliable if you have enough badges.