The actual answer is, do not even try to do that.
You should never have overlapping task outputs.
Instead make A a task of type Sync, copying from B and C to some dedicated destination directory.
This way you also do not need an explicit dependsOn which is bad practice except for lifecycle tasks.
So you want something like
Thanks, @Vampire. I played around a little further and came to the same conclusion. Clearly, I was trying to swim against the current with this idea. Always a signal that there’s an easier, different approach.