the codesign option runtime means "make the signature compliant with a binary built withe hardened runtime". But your error message means that the binary was built without the hardened runtime enabled. Building code and signing it are two different things - you can't retroactively build when signing.
You need to either use the + button on the left of the Signing & Capabilities tab to add the Hardened Runtime option, or if you're doing everything manually, go into the build settings and set ENABLE_HARDENED_RUNTIME
to YES
.
When you verify the signature of your app, using:
codesign --display --verbose <path-to-app>
Look for the line beginning "codedirectory" and ensure that one of the flags listed is "runtime".