Yes, the iPhone’s face recognition is not just a camera. Not even close.
Apple’s TrueDepth camera system replaces the front facing camera on the iPhone X and later. … A dot projector throws over 30,000 dots onto the user’s face, which are then captured by an infrared camera. To ensure the system operates properly in the dark, a flood illuminator adds more infrared light when needed.