I have an Xperia XZ premium that i just updated to Android Pie yesterday (long overdue monthly update from last year), and this problem started occurring. So far it only happens to two types of apps: browsers (chrome, firefox, opera beta) and games (pokemon go, modern combat 5, etc).
What happens is that when I have the app on the screen, I press the power button to put the phone to sleep then press it again to wake the phone up...it goes back to the app fine. But if I do the same thing the SECOND TIME (sleep then wake), the screen turns black (status bar and navigation bar still visible). I have to switch the app away then switch back, for the screen to show up. With games, the black screen is full-screen; but with browsers, the black screen is restricted to the webpage area.
I never use any form of lock screen. I tried to add a "swipe to unlock" lockscreen and the problem doesnt occur. So the problem only happens when the phone wakes from sleep and go straight to the app without any lock screen in between. Also, I would say that more than 90% of the time it happens during the second sleep-wake action, but sometimes it can happen on the third or fourth.
The android pie update was distributed with a monthly system update from october/november last year. I have now installed all the overdue monthly system updates to the latest version (april 2019) and the problem still persists. Anyone has a solution? Thank you.
*this question was also posted to another website.