It may not make sense that ambient lighting affects the quality, but it may make sense that it uses the TrueDepth sensor and the FaceTime HD camera to discern details other than depth.How does that make any sense? Isn’t your face scanned with infrared light from the phone itself?
I notice my X has a few failures in unlocking when I turn off the lights in my bedroom and the distance is right.