What do you think will happen to the gas gaints and Pluto after the Sun dies 5 billion years from now since the inner planets have been burned by the Sun?
Due to the intense heat they might get vaporised or if there is no gravity they may wander off into space and perhaps find another star to orbit although it will be very far :)
Depending how close mars/earth would be to the white dwarf of a sun, the 2 closest planets may stay in orbit of the dying white dwarf. The larger and more outward planets would float into everlasting space, no longer ruled by a star or gravity unless they happen acrossed another star, black hole, or something else that's gravity would start the planet's dancing orbit. Most likely, they would crash into other wondering planets, creating dust and metal particles, and thus in turn creating new planets in the universe.