Samsung has a feature of Smart Stay which keeps the screen on if you keep looking at it(and unofficially in close proximity to your face). Go to Phone Settings>Display and uncheck the Smart Stay feature.
I hope this will solve your problem.
Thanks & regards,
Talib