The bug
Leashing a mob and tethering it to a fence will keep the leash in the player's hand, and the mob will continue to follow, with the fence appearing as if the leash is attached to it.
How to reproduce
Put a leashed mob on a fence.
Click the fence again to make it now stay tethered.
I wasn't able to reproduce this. If possible, can you please attach a video showcasing the bug and reproduction steps?