My phone updated to Android 17 this week, and for some reason, notification sounds were no longer muted at night. Despite the phone being set to "Do not disturb".
Turns out that "Bedtime Mode" overrules "Do Not Disturb" (but is overruled by "Quiet Mode"). The issue was that "Bedtime Mode" had new default settings, apparently.
All three modes are in different sections of the phone's settings. I get the feeling this could be easier...