As of Xcode 26, I don't know why but it doesn't seem to respect folder structures at least with a new Swift iOS app.
I ended up solving this by explicitly creating two new steps in Build Settings where I copied the resources that have duplicate names and put an explicit sub_path.