Go to Xcode - > Preferences... - > Accounts.
Delete the Apple id.
go to Product -> Archive and upload the app.
Now login to your Apple id :-)
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: