When you have an animal on a leash and place a fence it places the fence and the lead at the same time causing other fences nearby to look glitchy.
How to reproduce:
Use a lead on an animal
Place a fence by clicking on another fence block
When the glitched fence is right clicked or the player relogs the fence turns normal again.
Related issues
Comments

Duplicate of MC-158774.