I finally found the solution. It took me longer than I expected. It was a caching issue.
.xcodeproj.Inspect Package Contents, and delete xcuserdata inside it. You don't need to delete xcshareddata.project.xcworkspace. Do the same for that, too. And the warning goes away. Yay!