In the awesome new Era Sourcebook Dawn Of Rebellion, it gives you the stats for The Grand Inquisitor, The Fifth Brother, The Seventh Sister, Grand Moff Tarkin, Director Krennic, Agent Kallus, and... (insert imperial march noise here) Darth Vader. So what happens if you pit the pcs of your adventure/campaign with one of these famous characters and the pcs end up killing them? Well, not actually killing them just making them go over their wound threshold. I was thinking you could make a dramatic scene where that famous bad guy was subdued and retreated and not actually killed, because if you've seen Rebels or Rouge One or A New Hope or The Return Of The Jedi you've probably seen how some of the listed villains died. Any suggestions?
Little question...
First off, as the sidebar at the beginning says, if you don't think the NPC stats are up to challenging your PCs, increase them. There's nothing stopping you from giving Vader another point in Brawn if you think he needs it, or adding some talents to Hera, whatever. It's your game.
But if you use them or change them or ignore them and the PCs still end up winning, you've still got some wiggle room. If the PCs drop the bad guy and run, then there's nothing to confirm they really died. They could easily survive the injuries and recover, returning to the state we know in the films but with the added chip on their shoulder regarding the PCs. I ran an Age of Rebellion game where my players ended up squaring off against Vader. They retreated to their shuttle and then blew up the landing pad with him on it. Before next session, I sent out an email describing how Vader climbed out of the rubble—damaged, humiliated, but alive. And that he knew what they looked like and would remember them for next time.
You could pull something similar, with the hurt and/or unconscious bad guy kept just out of reach of confirming the kill. Reinforcements show up, the crust of the planet splits apart, she falls off a cliff to an uncertain fate. The important thing is the "never found a body" trope, though since cloning is a thing in this universe...
The bad guy could also end up captured. I recommend looking into the light side ending* of The Force Unleashed II , where the game ends with Vader in chains... yet he's still clearly a threat and in control. A villainous escape is easy to picture, especially if the person is a.) Force sensitive, or b.) a valuable enough VIP in the Empire to warrant a commando raid rescue. Just don't forget to make the PCs feel significant in the effort, and use the opportunity to get them off the problematic trail and back into dealing with your own NPCs.
Or just throw canon out the window and roll with it.
* I won't call it the "canonical" ending, for two reasons. First, it's part of Legends, and is therefore not canonical. No reason your game couldn't be set in the Legends universe, though. Second, given that the third game was canceled and how the story would have continued is unclear, I would actually posit that the dark side ending is more canonical with Legends.
I second the roll with it option. It lets the players achieve something incredible and makes them feel like they're actually having an impact not just on their own stories, but on the galaxy as a whole. It also lets you have fun with imagining how the Empire will respond to this change. If Darth Vader dies, who becomes the Emperor's new second-in-command? How much chaos will that cause? How hard will the Empire crack down on the players? These can all be fun to explore.
I refer the OP to the Lord British Postulate .