I had same problem of notification sounds not working on iphone 13 Pro Max, running ios 15, when the screen was locked. I was receiving notification on my iwatch SE. I drove myself nuts for days changing all the settings on my iphone, nothing worked. If you are connected to an iwatch also, try this:
Turn off iwatch power, test notifications on iphone when screen locked.
If you now have notifications sounding, and displaying banner on locked screen this is good news!
Go to watch settings on iphone > passcode > wrist detection > turn it off.
Now test your notifications with iphone screen locked. You should get notifications on BOTH iphone and iwatch :)
You're welcome