I'm going to put together several answers and comments into one cohesive answer.
The attack on the second Death Star was not simply to destroy a weapon, the Empire could build more, it was an assassination attempt on the Emperor. The Emperor created the Empire and held it together. If the Rebels could kill the Emperor they could end the conflict. This added urgency to press home the attack now rather than leave and allow the Emperor to escape.
While the Rebel Fleet was falling into a trap, a convincing deception plan would require much of the Imperial fleet to be actually scattered chasing Rebel distractions. Thus the fleet they were facing at Endor, while much larger than the Rebels expected, was still diminished compared to what they might have faced. A fleet likely too large for them to tackle directly, but small enough to give them a chance of destroying the Death Star and the Emperor with it. 30 Star Destroyers may seem like a lot, but that represented just one reinforced Sector Group. Over the course of its existence the Imperial Navy had 25,000.
A coordinated Hyperspace jump of a large fleet close to an object as large as the Death Star, not to mention the planet sized Endor and the giant planet it orbits, would have been difficult. The fleet jumped as close as it safely could to the Death Star without risking being scattered and then had to fly closer; this inaccuracy of Hyperspace jumps can be seen by the necessity of the Thrawn Pincer where the fleet is precisely yanked out of Hyperspace by Interdictor cruisers. Because of the Emperor's deception plan (and flair for the dramatic) the Rebel Fleet approached the Death Star unmolested by either the Imperial Fleet or the Death Star. If they left and came back, their return would not be so easy and would likely be taken under concentrated fire as soon as they appeared.
Pulling off a coordinated retreat with the ability to jump back minutes later would have been difficult and costly. True, Admiral Akbar would have been prepared for this. Rebel strategy requires a Fleet In Being and a comprehensive escape plan would be an integral part of any battle. This can be seen in how Akbar, recovered from his surprise at walking into a trap, calmly issues "All craft, prepare to retreat" indicating an existing retreat plan. Regardless of his plan, different ships would need different times to prepare for Hyperspace and align, capital ships would take particularly long. They would have taken additional fire during this period. Any stragglers or damaged ships would have been mauled. After jumping, the fleet would need time to reassemble, get back in formation, perform any immediate repairs (or ignore them), refuel, reorganize, and jump the now diminished fleet top of the now waiting (not hiding) Imperial fleet and fully operational Death Star.
If the Rebels did jump away to regroup and return, a pursing Imperial fleet would likely have spoiled this plan. A fleet that large would be easy to track, and a damaged, scattered, Rebel Fleet would have been a juicy target.
Finally, while the trap indicated surprise was lost, the Rebels did have one card left to play: their confidence in Han to get the shield down and the Emperor's arrogance that it would not happen. The shield generator, while well guarded, was not as well guarded as it should have been. While Akbar and Lando would not have known what was going on on the surface, they would have at least known that certain defensive preparations had not been made. The Imperial Fleet, confident in the shield to protect the Death Star and following the Emperor's orders to let him play with his new toy, was not in a position to protect the Death Star. By engaging the Imperial Fleet at point blank range, the Rebel Fleet assured the Imperials would not be able to react in time to protect the Death Star when the shield dropped allowing Rebel starfighters to enter the superstructure relatively unmolested.