Trying to distribute app using Xcode Cloud, getting Ad Hoc Distribution error but certificate is for App Store

My app is pretty old. I used to distribute it using an Enterprise license, so I didn't have to worry about App Store. But now they have requirements for purchasing the Enterprise license, so we weren't able to purchase it this year and we had to switch to Apple Business Manager and a standard Developer Account. I've been trying to upload my build to App Store Connect, but I haven't had success. I'm using a workflow I created with Xcode Cloud and it is connecting to the repository where my app is. As of this moment, the app builds correctly but when it gets to the signing stage, I get the following errors and it fails:

I don't understand why I'm getting this error since the provisioning profile is for App Store distribution, not Ad Hoc. Furthermore, I've tried building and archiving my app locally in Xcode, which works perfectly. And I choose the Upload to App Store Connect option, and it apparently successfully uploads. But then when I go to App Store Connect it doesn't appear. I do get an area in TestFlight that shows a version number and an empty area below, which then disappears after a few minutes (see image below)

I also tried using the Transporter app, but I get the same issue as the image above. I'm pretty much out of ideas on what to do here, so any help that you can provide will be greatly appreciated. 

I managed to get some "progress". I changed the version of the app on Xcode to 1.0, which was the version that was on App Store Connect. And I did the upload through XCode and now I get something different

Unfortunately after a minute or so it disappears and nothing happens. I need that build to show up so I can submit my app. Also, I read that you're supposed to get emails indicating what went wrong. I'm not getting those emails because I used my Apple Business manager account (@*.appleid.com) and I don't get any emails there.

Trying to distribute app using Xcode Cloud, getting Ad Hoc Distribution error but certificate is for App Store
 
 
Q