Its technically quitting which means pension is removed. The only way to keep a government pension is to retire from the government with x amount of years. I forget the base amount, but this is why people will work for the government for a while, go to contractor to make a shit ton more, then go back into the government to retire.
Not the best option because if you resign, you then lose your pension (what is left of it). Best bet is to hold out as long as possible then just retire
But for those who are at retirement age, the only way to get it again is to be hired again, which wont happen for atleast 4 years