In Rogue One,
we see the Death Star takes very little time to prepare and make a jump through hyperspace (from the time the battle of Scarif starts there is just a few minutes time that passes for Tarkin to move the Death Star into Scarif orbit).
Additionally, the Empire knew (or at least might have reasonably suspected) at this time that
the rebelsRebels had in fact succeeded in stealing the plans of the Death Star from Scarif's data banks, and may have found a weakness in the design because of the treachery of Galen Erso.
That being the case, whenduring the assault on the Death Star in A New Hope occurs on the Death Star, why was the command not given to jump to hyperspace away from the attack?