Whenever you duplicate a scheme in XCode, if you do not make any changes the the scheme configuration (‘edit scheme’ in XCode), XCode will not create a separate .xcscheme file for the new scheme.
This, apparently, causes
eas build to complain about not being able to find the scheme:
✔ Linked to project @****/**** Error: scheme '****' does not exist, make sure it's marked as shared
Notice that the scheme exists, and is marked as shared at this point. As soon as you click ‘edit scheme’ in XCode, even without changing anything, the .xcscheme file is created, and eas can find the scheme at this point. I haven’t had this problem before with fastlane (that I used to build this project with before swtiching over), so apparently it is possible to detect if a scheme exists in a different way (or maybe fastlane doesn’t check, and just passes it to xcodebuild, I don’t know).