I think this is related to focus modes. I made a thread
here about tying to understand notifications when a focus mode is active.
I believe that in the setup for a focus mode, if "Silence Notifications From" is selected, you will continue to receive notifications from apps/contacts as long as you haven't added them to have their notification blocked. That works to allow notifications to come through.
However, I discovered that you also have to go into Settings > Focus > Focus Status and toggle off "Share Focus Status" or "Share From" for individual focus modes. If these are toggled on and the focus mode is active on your device, it seems that others will still be notified that your notifications are turned off even if those contacts are allowed to notify you in that focus mode. Seems like an oversight on Apple's part. Hope that is clear. There is also a "Share Focus Status" toggle for individual contacts in the Messages app (as long as it is a thread with only one person and not a group thread).