Reproduction steps:
1. Create a new Unity project
2. Build the project for the iOS platform
3. Open the built Xcode project
4. Sign the “Unity-iPhone” project
5. Archive the project (Product > Archive)
6. After archiving is finished, close Xcode
7. In Unity Editor, build the project again in the same folder and select “Append” in the pop-up
8. Repeat steps 3 and 5
Expected result: The archive is created successfully
Actual result: Multiple “Unexpected duplicate tasks” errors are logged in Xcode
Reproducible with: 2022.3.61f1, 6000.0.48f1, 6000.1.2f1, 6000.2.0a10
Reproducible on: macOS 15.4 (M1 Max)
Not reproducible on: No other environments tested
Note: Tested using Xcode version 16.3