My sister in law's mom and her daughter have the same thing too where the daughter can unlock her mom's phone with faceID. I researched this and apparently, if you have an unsuccessful unlock first and then you enter the code to unlock, then the phone may train the faceID with the new face too.