don't know about the AGI situation, but there are 2 PINs which can get confusing:
the 5 digit pin entered during the e-file process which is something that's up to you and will probably default to the one you used last year.
the 6 digit "ID Protection Pin" is what the IRS cares about so if it's rejecting at IRS due to Pin error it's referring to this 6 digit one. You set this under Other Tax Situations / Other Return Info / Identity Protection PIN
But the 6 digit Pin changes every calendar year, if you didn't opt out from this feature you will have a new one generated and can find it by logging into your IRS account and looking under your profile at https://www.irs.gov/your-account