If you are leashing a mob with a lead, the inventory slot which contained the lead will be empty. If you then select a fence item in your inventory while still leashing the mob and leftclick on another fence which is already placed to tie the mob to the fence, your fence item of your inventory will be gone (or the amount will decrease if carying multiple fence items in the slot).
The mob is successfully tied to the fence you've left clicked on, but your fence, you've carried is also gone. It is not visible! But you will see some flickering lead on the fence block where it is tied on. You can get your fence item back if you destroy the fence block where the tie is on. After the block gets destroyed, you will get 2 fence items dropped.
Related issues
Attachments
Comments


I validated the behavior without any resource pack and I still am able to reproduce it. I added four more pictures where you can see it.
During my test, there was another strange behavior: The lead kept tied onto an invisible fence after destroying the fence it was tied to for quiet a second before it broke... You also can see this on one of the new screenshots.
Thank you for your report!
We're tracking this issue in MC-158774, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

@Julian Breitung Pretty sure that's because lead knots are entities, and isn't something Mojang can easily fix.