Oh, here's a trick to ease your work.
Your trainer ID and Secret ID are decided at different times, you can create a save state at the quote before your character shrink, and keep making save states from there, your ID will be same, but the SID will be different