Greetings and Welcome to Just answer.
30-Minute Relearn Procedure
Use this procedure after replacing any of the following components:
Important: The vehicle learns the key transponder information and/or passwords on the ignition switch transition from OFF to RUN. You must turn the ignition OFF before attempting to start the vehicle.
Ok, You need to have the battery checked. If the battery is weak, it may show fully charged with a charger, but that only means it is not taking any amps. A bad battery will not and can show a false good. I suggest taking it and seeing if it shows bad on a load tester.
As for the code, does it reset if you clear it out?
Ok, then test the battery as I suggested and see.
Not always. Sometimes they short out inside and will not allow it.
You can reply at any time for follow up information regarding this issue, even after you accept my answer and I will reply.