As of Xcode 15.4 (and possibly earlier), Xcode does does not build all architectures for a target when 'Build Active Architecture Only' (ONLY_ACTIVE_ARCH) is set to 'No'. Instead, the run destination ('My Mac' vs 'Any Mac') appears to completely override that setting.
The help documentation blurb for ONLY_ACTIVE_ARCH states the run destination is only used when the build setting is enabled, and that was indeed the case in earlier versions of Xcode.
Has the expected behaviour of that setting changed?