In my case, what worked was to review the plist file and check the names. In the adhoc profile, you can see the name from Xcode if you import the provision file. Also, check that the names match, even if they are lowercase or uppercase.
You can review this code, for me it's working
https://github.com/cedvdb/action-flutter-build-ios/tree/main