It's possible the issue could be related to the shaders you're using. Does this occur when you do not have any shaders installed?
Unable to reproduce the described issue in 1.21.1 Java and Bedrock versions. The duplication rail in the screenshot pushes the block behind it breaking the redstone dust above it and the rail.
Did you run your world through a program similar to WorldEdit recently? Programs like that have a tendency to erase all existing mobs after having been run through the program.