They really don't have any rank. So yes, he would be just like any other prisoner.
Most those are smart enough to "resign for the good of the service", and walk away with their retirement. If they are taking a Flag Officer to Courts Martial they usually have the evidence to convict otherwise they don't waste their time.
However, I doubt they will send a Flag Officer to Leavenworth. He'll end up out, possibly sans retirement at worst.