Well, with Anton Yelchin, I think it's an easy fix. Chekov, the excellent officer he is, got his own command. He's doing great. Kirk just had dinner with him right before this new adventure began - he's gonna make admiral soon enough. Has a wife. A kid on the way. Nothing can stop him.
Chekov is part of the family, but nothing is tying him to the Enterprise. So he can go off and have his own adventures without Anton Yelchin. We can be happy for him, even as we're saddened by what happened to Anton.
With Leia, I don't think it's that easy. We don't know, at all, where her character ends up in episode 8. Maybe there will be a natural breaking point where she can go off and live happily ever after. But right now? Sure, her husband's dead. But her son is a major villain that she desperately wants to save. Her brother has just been found. The war isn't close to being over. If she ran off now, it'd feel just as cheap.
The question is....would Leia be justified to abandon the war if it all just became too much. Her planet. Her mother. Her adoptive parents. Her husband. Her brother. If they all die, would it be okay for Leia to get in a ship and never come back? Try to find a little happiness after this damned war took everything else from her?
Because that's the only way I could write it. She did her part. Lost enough. And wants to salvage what's left of her life. Let someone else be the hero for once.
Is there any precedent (EU or otherwise) for a non-Jedi to become a force ghost?