Xcode error: Multiple commands produce '.../App.app/Info.plist'

Not sure what happened, but suddenly Xcode tells me:

Multiple commands produce '/Users/user/Library/Developer/Xcode/DerivedData/App-dsabcckybabczwcaxabfxabclamn/Build/Products/Debug-iphoneos/App.app/Info.plist'

I deleted build folder, I deleted iOS folder, but it happens again.

rm -rf build
rm -rf build ios
rm -rf ~/Library/Developer/Xcode/DerivedData/*

npx cap add ios
npx cap copy ios
npx cap sync ios
npm run build:cap
npx cap open ios

How to fix this? How to even debug it? I have no clue about Xcode, overwhelmed with all the configuration options nested in multiple layers all over the place.

I found that under App targets, build phase there were a lot of files in “Copy bundle resources”. I removed those with backspace, then had to run rm -rf build ios && npx cap add ios to re-initialize the iOS part.