The screen sometimes doesn't wake when you: (1) press the Escape key on the Lock Screen, and then (2) press a key, such as the spacebar, to wake it.
On my M3 MacBook Pro, a workaround is to adjust the screen brightness using the brightness keys, which somehow wakes the display.
See: https://forums.macrumors.com/threads/m2-air-display-sometimes-stays-black-after-waking.2389035/
Apparently, fixing this hardware issue requires replacing both the display and the lid angle sensor.