I found a general solution:
Upload using Transporter app from Apple:
https://apps.apple.com/no/app/transporter/id1450874784?l=nb&mt=12
Have to build using the Custom option, select "App Store Connect" then Export (this takes some time).
You then get a PKG file to upload.
It gives way more detailed messages around what is failing with the build on upload. My example:
Can also open the menu to see more details processing info.
Topic:
Code Signing
SubTopic:
General
Tags: