I was going through here looking for WE help with BOP items and I think I figured out a simple way to explain it. Specifically, I am in Minecraft 1.12.2 with the forge launcher as far as this information is concerned.
To start, you have to be able to see the advanced tips by pressing F3+H together.
Now, when you hover over items you will see their tag name in grey text at the bottom of the details pop-up.
I am using Ebony Planks as an example because that is what I was working with.
If you just type in the tag as is, ( //replace biomesoplenty:planks_0 ) you will not get the Ebony ones.
However, there is a second number that is important for this.
In the top right, in white text you'll see the item ID, in this case, it is shown as #4132/14
The important number is the 14 after the slash.
If you type the same command as before including this number, //replace biomesoplenty:planks_0:14 , you will actually replace things with the Ebony planks as intended.
I haven't tried it with other items, but I imagine this same command configuration would be the basis of how to use modded blocks with the commands with little to no issue.
Hopefully this information helps somebody. :)