THen you have a problem. However I would guess that a sort of dead man's handle program could be hard-wired to cause a self-destruct in the event of tampering . Not unbreakable but would make hijack / theft more difficult. The Cardassian Dreadnought was effectively a drone ship rather than a missile, given its level of AI and its ability to provide life support, and that got hacked.
the main use I would see for automated ships would be perhaps as shepherded cargo ships. one crewed cargo hauler flying with a number of cargo drones that don't need to waste space on crew facilities (no crew quarters, minimal life support, minimal computing and gravity). Crew could beam over if needed to effect repairs or defend in the event of attack.