Australia’s outgoing anti-corruption commissioner has struck a defiant tone hours after his shock exit was announced.