I've had my HTC U11 with Android (8.0) for almost 14 months now, and I'm very on top of my phone's notifications. I'm fully aware of how the Battery Optimization feature works, and I know how to exclude individual apps from this feature if I don't want them being optimized/suppressed when the phone goes into Doze mode.
Normally Doze mode doesn't kick in for about ten minutes or so after the phone is sitting on standby, but as of yesterday, I have noticed that I wasn't getting any notifications, but they would only come in if I woke my screen up, which is what happens when you wake your phone from Doze with apps that are being optimized, however it seems as though that my phone is acting as if it's going into Doze in just a couple of minutes after the phone sits idle. Then once it goes into that mode, notifications never come in until the screen is awake, even if particular apps are set to 'not optimized.'
What I rely on the most are my notifications for my email, and that is through my Gmail app, which I have set to 'not optimized' through the Android system's Battery Optimization feature, so even in Doze, I normally get my Gmail notifications. However, with this issue, I don't until my screen is awakened.
First troubleshoot I did was just turning the phone off and turning it back on to see if it fixed any glitches, which it does many times. I did that a couple of times, but did not help. I really would like to find out what has changed and how to fix it because it's getting old to have to always hit the home screen button intermittently just to see notifications. Any help is appreciated. Thank you.