If you try to use an item with a right-click function (bow, food, etc) while facing any fence block (crosshair is on the fence hitbox), the item won't do its intended function; instead, it acts as if it's trying to interact with the fence (with the same animation as interacting with a switch or a noteblock).
Related issues
Comments

WAI. MC-4582