Screen does not ligh up on incoming call Xperia Z5 Dual with Android 7.1.1

Sometimes when the device is receiving a phone call (Messenger and Whatsapp work fine), the screen does not light up and I am unable to pick up the call. 

Does anyone know what the problem might be?
Try re-calibrating your proximity sensor.
You can also try wiping the top of screen, around the sensor location. Any coating can sometimes interfere with the normal operation of the sensor.