I think this raises from the fact that they are the same id but different damage values.
RP2pr2 Marble is 122:0 and Basalt Cobble is 122:3 so I guess it just doesn't pay attention to the damage values.

[Bug 1.15, 1.23] Miner placing RP2pr2 basalt cobble turns it into marble
-
-
Nice catch. It was mentioned in the additional pipes thread as well, was that you? Anyway good thing to not ignore metadata
-
- Official Post
Fixed for the next release, not worth a hotfix though.