Yeah the only thing that worked for me was to replace the phone. It's really weird, I do agree.
If it was really software, it would have been fixed when I reverted from ios 16.1 to Ios 15.x, but it did only, for a while.
If I were a conspiracy theories, I would say it's almost as if they pushed a firmware update to whatever sensor in charge of Face ID (truedepth) and it messed up the sensor or it would not be recognized correctly anymore.
But then again, in my case since it would stop working after reverting to ios 15.x, maybe it was indeed really a hardware problem.
But then again, seems I'm not the only one with the same problem...
So maybe it's a design problem and after a year of use or something the sensor goes bust (?).