There's a problem with the front facing sensor. The phone is designed to keep the screen off if in a purse or pocket. For this end, the front facing sensor is used. The notification, or an errant press may light up the phone screen, but the sensor detects it as in a pocket or purse, hence the screen is turned off immediately. I just tested on my S7 Edge. If I cover the sensor on top and press the unlock button, the lockscreen only lights up for one second before turning off again, similar to the OP's case. If however it is uncovered, then the screen lights up for about 15 secs (same as my normal timeout when using phone) before turning off.
There case on the phone may be ill-fitting, or you placed a low quality screen protector that reflects the sensors back instead of letting it through, making it think it is covered, or the sensor may be damaged.