Mainly talking about stories that span multiple instalments, like TV shows with multiple seasons or a novel series with multiple books.
In my experience, when a main character exits a series prematurely, it's usually a) because their actor was no longer available or b) because they're going to die. What examples are there of major characters in a work who left, but not for either of these reasons? If not examples, how might you hypothetically go about doing it?
I'm imagining a character whose development and arc have reached their conclusion/logical end point. After that, it feels natural for the character to stop showing up, otherwise you might get the feeling of "What exactly is this guy still doing here?" However, major characters like that are usually a core part of a series' identity, so it could feel weird for them to stop showing up altogether.