I know it sounds insensitive to your problem but: don't do that and it won't happen. I don't think you can fix it well so that it both will not happen with this loco and also not plague the occasional other loco in the future. Maybe someone else has a solution that will always work but my experience was . . .
When I redid my layout with Atlas track, based on their excellent reputation, I tried two Gargraves switches and had similar problems with a couple of different brands of pilotless locos (Lionel 0-4-0, MTH 0-6-0). Most of my locos -- all that had front pilots, seemed to do fine, they would go through them with no problems, but both 0-4-0s and the MTH 0-6-0 would not, and a Lionel 0-8-0 would sometimes not: maybe once if four times de-rail there, too. I fussed with tried to diagnose the problem and eventually went to the trouble of using Fastrack switches and making transitions to and from the Atlas around them (which was indeed a pain).