I used to have this problem as well. I learned that if you go to Settings, then tap on About device, then tap on Build number 7 times, it will activate Developer options. Then you can go back to the main Settings menu, tap on Developer options, and then turn off the Stay awake option.