Who invented hyperdrives that only work outside gravity wells?

AKA, dramatic handwaving.

As a general rule, any FTL system that works within a gravity well
A: as has been said, can position an assault ship right past any defences you care to name, rendering any interstellar combat a question of who shoots first.

B: Provides a very nifty, very easy way to shoot said planet. Even if all you’re doing is jumping into an alternate dimension, that’s not something you want happening to your planet’s crust.

In short, yes, handwaving. But necessary handwaving.