But out of interest, how do you target the weapon rather than the character? Do you mean clicking on the weapon graphic displayed on the character sprite, rather than elsewhere on their body?
By character sprite, do you mean the controllable character (so, not any icon or rendering in inventory)? If so, yes, I would put my cursor on the weapon instead of anywhere else.
But, annoyingly...I can't seem to be able to reproduce the bug. But it did happened to me at some point

At least, it's working now for me 😅