A ship caught carrying five tonnes of cocaine is making its way towards Sydney after being stripped of its cargo.