I have this problem all the time - what a pain. Now I stop a little way before the seam end with needle still in fabric, lift the foot and readjust the fabric. If necessary, I go back and restitch very slowly. Seems to help most of the time. I think it happens because the foot extends beyond the material at the end of the seam and with nothing under it just wanders out of line. Do I just imagine this?