Guitars and basses: secure the instrument in the case and the case in the box
First check movement of the instrument inside the case. Fill appropriate spaces with compatible material so the body cannot shift, without loading the neck, bridge or controls.
Then treat the case itself as an item that needs shipping protection: cushion and immobilise it inside the outer box. A hard case can spread impacts but can still be damaged or transfer force to the instrument.
A gig bag provides less structural resistance, so the outer packaging needs to do more of the protective work.