I had this happen all the time, although I’m using a beta version of Android (pixel 7 pro)
Seeing this post made me realize that I haven’t seen this happen in a while, even though I’m still using the beta, maybe they fixed it? Good luck trying to report it as a bug by the way, I reported a notification shade rendering bug and they labeled it as a duplicate of a completely unrelated lock screen bug!