In Xcode, right-click on the folder, select Convert to Group from the context menu, and then it can be used normally.
original answer - CocoaPods pod init Fails with “Unknown ISA PBXFileSystemSynchronizedRootGroup” Error on Xcode 16