Yes, most military security clearances do end (immediately or up to a couple years) after leaving service.
It makes no sense, to me either, that elected officials do not have the requirement of having a security clearance/investigation and, yet, are privy to sensitive/secret info, etc.
Having a required security clearance, for elected officials, has come up but, thus far, has been either "voted down" or "benched" due to those who did/do not want this requirement to come to pass.
Politicians, etc., who brought up arguments, against it, that make no sense to me.
Maybe one reason could be because there may be some "dirt" that they don't want dug up (by honest agents).