Reading through this thread and based on my own experiences I see that this issue started with iOS 11, Affects multiple different models of iphone, and affects phones both purchased new as well as those upgraded to iOS 11.
I’ve also noticed on my phone that the clock and any messages are sometimes visible for a split second before disappearing and the lock screen image fades slightly. This makes me suspect that there’s a bug in the alert screen or notifications routines. Either way, it’s pretty clear that it’s A bug with iOS 11 and that we’ll need to wait for Apple to fix it.