Oda was asked specifically about this in an SBS… he was asked what happened to Koby’s dream of becoming promoted to Admiral if he’s in sword… it’s in SBS 107
D: In the past, Koby's goal was to become a commissioned officer of the Marines, but now he wants to be an Admiral! Would his rank still rise, even if he's now a member of SWORD, whose resignation documents are already formally submitted? P.N. Hinokuni Toppi
O: Yes. Was the explanation about SWORD a bit complicated? In chapter 1080, Aokiji said "formal submission of documents" and "they can be disavowed at any time". This means, they entrusted their resignation but they are not disavowed yet. In the case of a Marine soldier getting caught and becoming a hostage, the Marines will acknowledge their resignation then and there and say "that guy is not a Marine soldier!" and forsake them. The ones who are fine with this, so they can fight as they please, are the Marine soldiers called "SWORD".