Yes, he administratively lost the rank on retirement because he had not completed his courses yet.He isnt a command SgtMaj. He lost that rank because he did not stay long enough to fulfill the requirements to retire at that he retired a Master Sgt.
He did not get demoted while serving. He did not get demoted for anything dishonorable. He was administratively demoted, upon retirement.