SwiftPM produces different results for different dependencies

I've switched my project from CocoaPods to Swift Package Manager and had trouble with the build. For some dependencies, SPM produces the same results as CocoaPods. But for some dependencies (like RxSwift framework) the result is different. SPM build includes Modules/RxSwift.swiftmodule with all the Swift module information. The project builds successfully, however 'Embed System Extension' step removes these Modules/* files and breaks code signing as a result.

Is it possible to force SPM to build dependencies without Modules/* files?