I first resigned all my code with --deep, and then my executable with the entitlements.
Don’t use --deep. Even if you ignore the entitlement issue, it has other issues [1].
Rather, sign each code item separately, from the inside out. Creating distribution-signed code for macOS has specific advice on this topic.
The console shows …
As I mentioned above, you may need to install new provisioning profiles, depending on your entitlement use and the relationship between your new code-signing identity and the previous code-signing identity.
If you do need new profiles, install them before you start signing (because changing a profile afterwards will break the seal on the code signature).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Specifically, it has its own views of how a bundle should be structured, and those don’t necessarily align with the documented rules in Placing Content in a Bundle.