Chosen Solution

log in code changes after battery replacment

Phillip, you’ve got something else going on here; there’s nothing whatsoever in the process of changing a battery that will affect your passcode. Some of the newer models will complain that the battery may not be genuine, but yours is too old to even have that “feature”. Did you have someone else replace the battery? Perhaps a repair technician changed a setting on your phone, but nothing in the hardware can do that.