In general I find endings to be overvalued (I actually write about this some in my scholarly work), so for me and my groups even an ideal "ending" is just when we feel like moving on because I start most campaigns with the idea that it is "indefinite," which is to say, it will continue "forever" as long as it is physically possible and we are having fun (while understanding that it can never really last forever).
Sometimes we get to places that feel like an end point and decide to try something else. For example, my currently in-person group completed a campaign built around Ghosts of Saltmarsh and the U1-2-3 modules. When we completed those, we took a vote and decided to put those characters on hiatus and try something new with different characters (in the same setting), with the idea being of potentially coming back to the first group and/or combining the two campaigns. We did this after a little more than two years.
My "Out of the Frying Pan" 3E campaign (check out the story hour) went five years and after what became a "central plot" was resolved we ended the game with lots of loose threads to potentially be returned to (or allow for solo play), but aside from two reunion sessions about a year later, we never did.
Much more often, especially in the past, games either petered out/ended because a change of cast (people moving, new jobs, grad school, babies, new partners, loss of interest) or because of a TPK. But since I don't personally have an end in mind when I create a new campaign, while I am often disappointed in the dissolution of the game, I am not unsatisfied because the play is the thing for me and I am not necessarily trying to build a so-called "satisfying narrative" but exploring the world (physically, culturally, politically, spiritually, etc) and seeing what happens while we're doing it with these particular characters.