I had the same issue today. What worked for me was going to "Certificates, Identifiers & Profiles" and creating a new key and Service ID identifier (instead of using App ID previously).
Post
Replies
Boosts
Views
Activity
This is code example from Apple seems to be broken now.
https://developer.apple.com/documentation/xcode/configuring_your_app_to_use_alternate_app_icons