While renaming your app bundle package name, it’s essential to follow the steps in the “Rename package name/build & publish your app” section of the documentation.
Summary: You need to change the OneSignalNotificationServiceExtension Bundle Identifier to be {your app’s bundle ID}.OneSignalNotificationServiceExtension.
If actual app’s Bundle ID is com.example.ios.app, the bundle ID com.example.ios.app.OneSignalNotificationServiceExtension would be correct.