Ok I don't know if this will help but give it a try. Go to Settings>Biometrics and Security>Face recognition> there you must find a setting saying 'Brighten screen' , try switching it off.
I forgot to mention the face unlock. It needs to locate identify and recognize your face. So if you're in a dark room it lights the whole screen(to help recognize your face). Hope this helps.
A51 has optical fingerprint reader, so it HAS to give out light to illuminate your finger and hence read your fingerprint(simply fingerprint sensor doesn't work if that light doesn't come)