I've had phones for close to a decade now (Moto X 2014) that can detect when I'm looking at the device and extend the timeout. So if I glance at the device every few minutes checking on the recipe or a map or whatever it'll keep the screen on indefinitely.
iOS has “Attention Aware” features but these features don’t account for atypical use cases like when I’m running some persistent app that needs foreground use (like a firmware update on an IoT device) that I can’t be bothered to stare at.