Are there particular circumstances where it happens? Mine does this after I’ve been holding the phone to my ear on a call or inadvertently activating the screen then not unlocking, so I figured I was confusing it and it’s a security measure. But this is my first phone with Face ID (15 pro, still on 17.0.2), so I don’t know what’s normal - and I rarely make actual calls so hadn’t really thought about it till I saw your post.
(It doesn’t overheat, just for the record.)