It seems like the simple solution is just to change your phone’s sleep settings when you know you’re going to be cooking
I know individual apps can turn off sleep. The browsers ought to also be better at recognizing that you're looking at a recipe, and keep the phone from falling asleep.