Xcode 13.2.1 fails to compile due to the using of same embedded framework but different versions in App Clips and iOS app

Description

My iOS project supports app clips, and both the iOS app and that embedded app clip are using same dynamic framework but different versions. To be more detailed, iOS app uses the full list of features in that dynamic framework, while app clips uses the trimmed features which aims to remove the package size according to the app clip size limitation.

The project works fine in Xcode 12.4. However, when we try to build it with Xcode 13.2.1, below compile error is reported. 

Multiple commands produce '{{ Path-To-App-Installation }}/MyDynamicFramework.framework/Headers':
1) Command: ProcessXCFramework {{ Path-To-iOS-App-Xcode-Project }}/MyDynamicFramework-v2.0/MyDynamicFramework.xcframework {{ Path-To-App-Installation }}/MyDynamicFramework.framework ios simulator
2) Command: ProcessXCFramework {{ Path-To-iOS-App-Clip-Project }}/MyDynamicFramework-v1.0/MyDynamicFramework.xcframework {{ Path-To-App-Installation }}/MyDynamicFramework.framework ios simulator

Step to reproduce

  1. User Xcode 13.2.1 to create an iOS project that has an app clips embedded.
  2. Create a dynamic framework, and generate 2 copies of its xcframework with different versions (let's call them v1.0 and v2.0)
  3. Add version dynamic v1.0 to appclip target, and add it to the Embed Framework list.
  4. Add version dynamic v2.0 to host iOS app target, and add it to the Embed Framework list.
  5. Build iOS app with Xcode 13.2.1, then compile errors/warnings show after log Building targets in dependency order 
Xcode 13.2.1 fails to compile due to the using of same embedded framework but different versions in App Clips and iOS app
 
 
Q