When signed with my development cert, codesign prints the following (with identifying information removed). When signed to run locally, it prints similarly appropriate information. In both cases an Intel-only build will run, but an Apple Silicon or Universal Binary build will not.
Executable=/path/to/executable
Identifier=executable
Format=Mach-O universal (x86_64 arm64)
CodeDirectory v=20400 size=1292 flags=0x0(none) hashes=30+7 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=d8cfc80142a15236c9fb1c7082746b0f0308685b
CandidateCDHashFull sha256=d8cfc80142a15236c9fb1c7082746b0f0308685b33b47e362df97ebbb28b19f7
Hash choices=sha256
CMSDigest=d8cfc80142a15236c9fb1c7082746b0f0308685b33b47e362df97ebbb28b19f7
CMSDigestType=2
CDHash=d8cfc80142a15236c9fb1c7082746b0f0308685b
Signature size=4779
Authority=Apple Development: My Name (XXXXXXXXXX)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=Jan 11, 2022 at 2:15:25 PM
Info.plist=not bound
TeamIdentifier=XXXXXXXXXX
Sealed Resources=none
Internal requirements count=1 size=168
code-block
I tried building a simple Hello World program from the command line, and it works fine when building for Apple Silicon. So the problem is likely something in the Xcode build settings, but nothing looks unusual to me.