While The Return of the King showed very little of what happened after the Lord of the Rings trilogy, it's made clear that Sauron's defeat at the end of Frodo's journey was different from his other defeats. In that final defeat, it became impossible for him to ever return, hence Gandalf leaving Middle Earth with his "task" done. However, Sauron did not technically die when the tower of Barad-dûr fell, even if he became unable to ever retake physical form or influence others.
They leave after giving him his Ring back and call it a victory, because finally they drop listening...??!!??
Read Shadowrun Novels to understand what is there after them GoT Lords pissing off a Dragon Worm somewhere in nowehere in a Forest surrounded by a Desert.