"Modern Developer ID certificates use the G2 variant" - I am not sure if this just changes recently but my Apple Development cert that has just been created on latest MacOS Sequoia + latest stable Xcode uses the G3 intermediate CA. Therefore instead of just installing some certificate it is better to check the developer cert which intermediat CA cert is used.
BTW: Why does Xcode not install the necessary intermediate certificates? I assume it is a bug, correct?
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles