system
Given the following post, respond as if you're commenting on Reddit:
human
What happened to the surviving Star Destroyers and Tie Fighters after the second Death Star was destroyed?

Did they flee or was their a longer battle we simply weren't shown?
gpt
Legends Canon

----

Long story short, they scattered.  There was a massive performance drop in the Imperial Navy shortly before and immediately after the destruction of the Second Death Star.  Some blamed the collapse on a lack of morale--after all, the Battle of Endor saw the destruction of the *Executor* and the Death Star II, crippling losses to the fleet.  The loss of the *Executor* was especially disheartening: some of the best and the brightest young Imperial officers served on that ship.

Others blamed the sudden lack of coordination on the sudden loss of Emperor Palpatine's Dark Side Battle Meditation.  While attempting to seduce Luke Skywalker to the Dark Side of the Force, Emperor Palpatine was telepathically linked to the majority of the Imperial fleet.  His malice flowed through his troops, heightening their combat skills and improving morale.  It felt good to be bad.  But, after Palpatine took a vertical trip down a power conduit shaft, his Battle Meditation suddenly stopped.

In either case, the Battle of Endor ended **horribly** for the Imperial Fleet.  Faced with the destruction of the Death Star II and *Executor*, acting captain Gilad Pellaeon ordered the retreat of forces to Annaj.  Some forces went with him, others didn't, and basically the Empire tore itself to shreds over the following months.  This made it especially easier for the Rebel Alliance to continue its solidification into what would eventually become the New Republic.

----

Actual Canon

----

The battle ended and the Imperial Fleet fled, as the skies above the forest moon of Endor were clear enough to have starfighter-launched fireworks in celebration.  That celebration sure was organized quickly though, they were probably planning it on the Hyperspace trip from Sullust.