I also ran into this on Xcode 12.5 beta 3. It's definitely a new problem.
I found a workaround (see my post here), but this workaround only works if B is a local package dependency. So you might try making a local copy of B, and instead of using ".binaryTarget", use the suggestion in my post. Alternatively, if B is merely a wrapper for C.xcframework (i.e. B has no source code of its own), then you could put C.xcframework somewhere in the same repo as A, and link to it using the methods mentioned in my post. (If you do the latter, you'll have to make a wrapper around A if you want to link to this from any .xcproj-defined targets).
Let me know if you run into any issues with the workaround.
That being said, I did report some of these concerns to Apple as well, so, hopefully they're able to get it working before 12.5 releases, in which case ideally this workaround won't be necessary.
BTW—I really don't understand why there are so many problems with SPM. Why doesn't xcodebuild treat it just like an xcproj file? It's as if they are handling SPM targets completely differently from how .xcproj targets are handled. They should handle them using the exact same code.