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.