I have some bad news - I have a MacBook Air M3 that has just started exhibiting the exact same issue, so Apple didn't fix it for the jump to the M3.
It's reproducible randomly on wake, and with the same sleep/lock & esc/keypresses steps as all of you. I purchased my computer shortly after launch, so it’s been 9 months or so. I'm still under warranty, so I'll attempt to get Apple to replace the screen & angle sensor soon.
However! I also have good news.
I found a workaround that will get the screen back up and working, at least in my case (remembering that I have an M3, so I have no idea if it will also work for the M2 - but I figure it's worth a try, since my Air exhibits exactly the same issue).
I found that connecting and disconnecting an external monitor would (sometimes) cause the internal display to reset and start displaying video again. Since it's a laptop, and I don't usually have an external monitor handy, I've bought a ~US$10 tiny portable "dummy plug" or "virtual display adapter" that you can plug into the USB-C port that emulates an external monitor. Sometimes it takes a couple of times plugging & unplugging, but so far I've always been able to get the screen to come back without resorting to powering down.
This is the adapter I bought:
https://www.aliexpress.com/item/3256807330821015.html If you bring a USB-C to HDMI adapter with you anyway, you can get an HDMI dummy plug for even less, more like $2.
I hope that this works for the M2 Airs with this issue just as well as it works for my M3.