I spent some time experimenting. There is an interaction between Do Not Disturb and wallpaper. Specifically, you can have a different wallpaper when DND is on. But it works both ways. If you change the wallpaper to the one that is assigned to DND it will turn DND on, and if you turn on DND it will switch to that wallpaper. So what you need to do is have a different wallpaper for DND than for when DND is off. Further, if you don’t have a wallpaper assigned to DND it will revert to a black screen.
What’s interesting is that, thinking back, it has always worked this way in iOS 16; I puzzled over it months ago. I don’t know why it has suddenly become obvious.