Handling Git conflicts when merging Xcode projects
Whenever I work on an iOS project with multiple developers working in parallel, I tend to have to spend a lot of time manually merging Xcode project files. This is a long-known issue with the Xcode project file format*. Listing all the project files in the .xcodeproj file causes conflicts that often cannot be merged automatically:

Workarounds
-
Use Swift Packages (can be embedded in the project repo) for components of the project
-
Generate the Xcode project using a tool like XcodeGen or tuist
-
Use .gitattributes to treat as binary / merge (corrupts xcodeproj occasionally)
-
Use a mergetool that can merge the pbxproj format: mergepbx (worked perfectly for quite some time but is not updated any longer and doesn't support newer additions to the Xcode project file format)
FB Bug report
After discussing this in a WWDC Lab in 2020, I filed a Feedback with Apple for this issue and posted on the Apple Developer Forums about this.