Should I loosen the strings if I don’t play on a bass for a while or if the bass is shipped?

The string pull is counteracted by the truss rod. Both are applying force on the neck and try to bend it although in different direction. If you loosen or remove the strings you should also loosen the truss rod. But best is just to leave it strung up and in tune.