Exactly what TopBunk said, make sure you get a copy of the inbound GD with the inbound stamp on it. Show this to immigration on departure with your passport and ID.
On re-entry clear as any other pax would, on exit again (while operating as crew) show the immigration staff your entry stamp and they should just stamp you out, (yes even if you are on the GD).