When attaching a lead to a fence post, if there is an item in the off hand it will be placed/used. It seems this was accounted for in the main hand, as the block places and then is removed.
Steps to reproduce:
Put torches (or something placeable/usable) in your off hand
Right click on a mob with a lead in your main hand
Right click on a fence post to leash the mob to the post
Observe a torch (or whatever you had in your off hand) also got placed/used
Expected result:
Mob is leashed to the fence post without placing/using off hand item
Actual result:
Mob is leashed to the fence post and off hand item is placed/used
Environment
Java 1.21.6
Thank you for your report!
However, this issue is Invalid.
Your game, launcher or server is modified.
If you can reproduce the issue in a vanilla environment, please recreate the issue.
Any non-standard client/server/launcher build needs to be taken up with the appropriate team, not Mojang.
A world which had previously been opened with a modified client might be corrupted. Please try reproducing the issue in a newly generated world.
Any plugin issues need to be addressed to the creator of the plugin or resource pack.
If you have problems on large servers like Hypixel, please contact them first as they run modified server software.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- 📓 Project Summary -- ✍️ Feedback and Suggestions -- 📖 Game Wiki