Some mass is sloughed off late in a star's life, but the star's core remains behind and this can still be quite massive. If a planet is not consumed by the star in the giant (or supernova) stages, it's orbit would be altered because of the decreased mass of the star.