5 CFR § 839.903
What happens to the Social Security taxes I erroneously paid when my employer corrects my retirement coverage to CSRS?
November 4, 2020
(a) Except for the last 3 years, the money you erroneously paid into Social Security will remain to your credit in the Social Security fund. The Social Security Administration will include all but those last 3 years in determining your eligibility for, and the amount of, future benefits.
(b) The amount you paid into Social Security for the last 3 years will be used to help pay your CSRS retirement deductions.