I have cleared out my Apple Developer account by revoking all existing certificates and profiles. Following that, I manually deleted all mobileprovision files and deleted the certificates in the keychain. Even after all of that, XCode shows multiple certificates (Preferences > Account > Manage Certificates), many of them with an "unknown" label, and it is not possible to right-click them and delete them. Where are those "ghost" certificates coming from?
With all due respect, let's not say (again and again) that Xcode is pulling these certs directly from the developer account. As I have mentioned above, the developer account has been emptied out (all profiles and certs revoked. So either there is a cache on the account or a cache in Xcode. Either way, documentation does not touch on this feature, and as it stands, I can't compile or distribute anything because Xcode not only doesn't see the new certs, it is still pointing to the old (deleted) ones.
I did not see this problem before moving to v13.