In my case, unlocked package B already has dependencies on packages C and D and its package version created fine.
I then tried creating package A with a dependencies on B, C , and D. The dependencies on C and D are identical between A's and B's sfdx-project.json.
And yes... all these packages are sharing the same devhub
Create version status: Error
Error (MultipleErrorsError): Multiple errors occurred:
(1) An error occurred while trying to install a package dependency, ID 04xxx00000Bxxxx: The package you're installing depends on package 'C', version '3.0'. Install package 'C' in the target org before you install package 'B'.
(2) An error occurred while trying to install a package dependency, ID 04xxx00000Bxxxx: The package you're installing depends on package 'D', version '3.0'. Install package 'D' in the target org before you install package 'B'.
In the end, I had to settle for putting all the packages in the same repository which ultimately meant they were all in the same sfdx-package.json, but that wasn't too different from what they were already.
Luckily, these are just test packages and I can delete them and retry them in separate directories later.