Are you sure? How do you now it unlocks it if your eyes are closed? Sounds like Shrodinger's locked status.
If you are still looking at the phone, and open your eyes, then it will at that moment recognize you are looking at it and unlock.
You can test this, by closing your eyes, turning it on, wave it at your face for a moment then before opening your eyes to check, cover the cameras with your thumb so they can't see you.
If its unlocked with the cameras covered, then it did unlock.
If its locked, then its not unlocking when you have your eyes closed, but unlocks it the moment you open them.