I'm hesitant to update to Tahoe and Xcode 16, but at least in Xcode 15, you can still add the AppleScriptObjC project templates that Apple removed. I just threw that in there since Xcode has various editors and does a lot of that kind of stuff for you. Get Info stores the icon in the Icon\r file at the root level for a folder, which would be outside the application Contents folder and code signed bits.
Script Debugger isn't quite as bad, but the script editors have pretty much always made their own tweaks to the bundle settings when saving as an app, so you should always manually go through the final build and double-check that the assets and Info.plist are set the way you want, including removing the default icon file. I haven't had any problems setting custom icons that way.
Topic:
Code Signing
SubTopic:
Notarization
Tags: