On the controrary it does not work in complete darkness, dim light is fine.
My iPhone 12 never unlocks with Face ID in the middle of the night, and neither did my iPhone XS. I can however see a faint red light flash from the sensor when it tries, I guess this is spill-over into the visible spectrum from the IR.