We too faced the same scenario.
In the IOS 15.4 if the photos app added in the "allowListedAppBundleIDs" the AirDrop prompt did't declined. But if it is not it will get declined.
In iOS 17.6.1, the AirDrop prompt shows up regardless of whether the Photos app is included in the "allowListedAppBundleIDs".
Only after IOS 18 , this issue occurs.