It does not stay on all night because it still follows the Always on Display rules (as defined by Apple unfortunately)...which means it is not actually always on. This has been documented now by many different users, and it's not because they aren't somehow following the right instructions.
A little closer to a FIX
I’ve gotten my phone to stay on while in standby mode all night:
[iPhone 14 pro max, iOS 17.0.2]
Settings -> Display and Brightness -> always on display -> on
Settings -> Standby -> always on -> on
No sleep profile scheduled or enabled
Settings -> standby -> night mode -> works for on and off
Procedure:
With these settings enabled, when I put my phone on the magnetic charging dock (off-brand purchased on Amazon) it immediately goes into standby mode.
The screen then goes dark after 30 seconds.
If I hit the table it’s resting on, the vibration brings the screen back to life, and this time it stays on for about 4 hours. Hitting the table again when it turns off, leaves the display on until morning.
Curious if this works for anyone else.
My assumption about what’s happening is that “always on” in standby mode (which has the wrong name if it’s not going to be just be always on) and has a sloppy description (the feature is called “always on” and the description only talks about when it will turn off) is programmed to adjust the period of time the display stays on while in standby mode. This adjustment is based on the user’s behavior. If it turns off and you tell it to turn back on immediately, it “learns” to stay on for longer. That’s my working assumption at least, as I try to make what should be a simple feature, usable.