From Dynamics of Cats, a great article on what happens to planets as a star leaves the main sequences and shrinks to a white dwarf:
if the mass loss is sudden, “impulsive”, the planet generally goes onto an eccentric orbit, possibly hyperbolic for mass loss of ~50% or more, depending on the original eccentricity of the orbit and where the planet is along the orbit. This scenario was considered by Blaauw in 1961 and is often referred to as a “Blaauw kick”.
Under the right conditions, planets orbiting large stars could eventually break free of their shrinking primary. Hard to know how often that happens. but there are a lot of large stars and our understanding of exo solar systems via Kepler and ground based work indicates planets are common. Over time that could lead to a galaxy with no small number of rogue worlds drifting quietly through interstellar space. I wonder what they might be like?