I recently had to replace the screen on an iPhone X. the iPhone was new to me (used one) so I added the SIM card and loaded the data from a previous back up. I activated the Face ID function during the setup and when completed it worked just fine. Face ID function would work just fine if I would immediately take it out of sleep mode.
It stopped working if the phone was in sleep mode for more than 15 minutes (may be less time then 15 minutes) When accessing the phone the only way to get into it was using the pass code. I would go into settings and tried fixing it. When resetting the Face ID and try reloading it I would get the message of "Face ID is not available...try setting up Face ID later". I would turn the phone off and restart it. I repeated the actions of going into the settings > Face ID & Passcode > Reset Face ID > Set Up Face ID. The phone would let me perform all the actions and would work just fine again until it would be in a pro long sleep mode and we would start all over again.
It stopped working if the phone was in sleep mode for more than 15 minutes (may be less time then 15 minutes) When accessing the phone the only way to get into it was using the pass code. I would go into settings and tried fixing it. When resetting the Face ID and try reloading it I would get the message of "Face ID is not available...try setting up Face ID later". I would turn the phone off and restart it. I repeated the actions of going into the settings > Face ID & Passcode > Reset Face ID > Set Up Face ID. The phone would let me perform all the actions and would work just fine again until it would be in a pro long sleep mode and we would start all over again.