I had the same problem with slides on a 2000 Itasca we had. I opened the slide with the coach out of level from front to back. When it retracted, it had moved to the front too far. Repositioned and leveled the coach and then opened and closed the slide again. Came back to it's original track.
If this does not work, try elevating the front slightly and cycle the slide again. As it comes back, add manual pressure in the direction it needs to return to and it should square up.
Scary, but not a big deal.
A big deal would be a broken cable or broken shear pin, in the rain - by yourself - at night - with a rising river threatening the CG - all with no lights and a dead chassis battery.

jk never will happen - all at the same time