Issue is present on the Mi 8.
It seems to be related to ambient display, namely always on display. If it is toggled on, when locking the phone, the status bar turns black and after another half a second the rest of the rest of the display area does.
If AOD is disabled the issue is not...