Good news!Ooohhh yeaaaah, I fixed it!
Problem is with ScrimView +id/scrim_in_front in status bar. It has default black color and class com.android.systemui.statusbar.phone.ScrimController changes its alpha between 0.0f and 1.0f under different circumstances. Front scrim covers everything inside status bar/notification drawer/lock screen. Switching off AOD was probably fixing it because there are different conditions for this in ScrimController and AOD being active is one of them. Root problem is probably deeper, e.g. dozing (another condition) being activated too early when you press power button and not when screen actually turns off, or something like that.
I just modified method com.android.systemui.statusbar.ScrimView.setScrimColor(int color) to change color from black to transparent whenever it tries to set it for scrim_in_front.
Can you fix my file if i provide to you?