When I try to do /setblock ~ ~ ~ minecraft:air, it sometimes wont work. For example, I want to set redstone dust or a fence to air. One of the command blocks work, but the others wont, even though the only difference is the coords. Ive tried switching the coords of a non-working command block to a block a working command block could delete, but that doesnt work. If a command block works one time, it will always work. If it doesnt work the first time, it will never work.
Linked issues
Comments

This sounds like MC-86846