For reference, here's the study window:

The cursor itself is omitted, but you can see the Woodworm is half over the slot, half over the study window outside the slot. Clicking in this position drops the item on the ground. This makes no sense and I don't think this is ever what the player intends - when I want to drop an item I either CTRL+click it or I hover it over the game world (i.e. any part of the screen not covered by UI) and click. Having it drop the item when clicking the interface is not what people expect when clicking any part of the interface - most notably the actually interactable parts of the UI, such as buttons. (If you try to click a button while holding an item, it instead drops the item and does not activate the button.)
So the simple change I'd like to see is that
- If the player clicks an interactable UI element, the UI element is activated, regardless of whether there's something on the cursor or not. The item is not dropped.
- If the player clicks a non-interactable UI element (e.g. UI window background, edge of slots, etc), nothing happens. Even if there's an item on the cursor, it doesn't get dropped.
Compare how the UI interacts with any other part of the game world. You cannot click any location in the world through a window background to move there, you cannot click an object through a decorative interface edge to interact with the thing in the game world obscured by the UI, and you cannot take any item from a slot behind the active window through any part of the active window. 'Having an item on your cursor' is the only use case where the UI simply stops accepting mouse input entirely and you perform a game world interaction regardless of where you click (with item slots being the only part of the interface that does respond to mouse input). There's been custom clients with 'drop protection' (require holding CTRL to drop the item on the cursor), and frankly I don't think that would even be necessary if slight misclicks just weren't interpreted as 'drop this item right now'.