When you build an image using devcontainers with mount /pathA:/pathA and then reference that image in a compose file, then using that compose file in a separate devcontainer.json with mount /pathB:/pathA, the mount in compose.yaml doesn't take precedence over the mount from the metadata, and the resulting container has the (incorrect) mount /pathA:/pathA.
The spec for mounts says:
Collected list of all mountpoints. Conflicts: Last source wins.
Which isn't the case. I created a minimally reproducible example https://github.com/Achllle/repro_devc_metadata with instructions and logs.