When I place a Torch on the ground (or on a wall) and then point, with an Anvil in hand, on the block where it is placed and then click on it, the Torch disappears and it'll be replaced by the Anvil.
Environment
I'm using the latest Java version, a Windows 10 PC (I tried it on other PCs, and it worked) and the Optifine for 1.12.1
Please do not mark unreleased versions as affected.
You don't have access to them yet.