After the ship sinks in the protoplanet, you can make a command check to mount an expedition to grab the cargo hold.  On a failure, it gets lost in the stellar mass and won't be worth the effort to retrieve.