The bug
Shift-clicking on items while holding the same item with the cursor stacks the items, essentially ignoring the fact you are shifting. This is a different behaviour than 1.20.4 where it would move them items to the other inventory. This is a very annoying bug as i frequently use this method to move a single or a couple of items to my inventory from containers, by picking up the entire stack, setting a few items in the stack down in the container, then shift-clicking the couple items into my inventory and placing the remainder back into the chest. It is more convienient that way because it does not require moving the mouse, however, this behaviour is completely broken in the 1.20.5 snapshots making inventory management much more frustrating.
This issue is closely related to but not the same issue as MC-267433. This particular bug is new to the 1.20.5 snapshots and does not regard shift-double clicking.
Steps to reproduce
Place a stack blocks into a chest
Pick up the item with your cursor and use the right click function to place a few of that item into the chest
While holding the partial stack of items with your cursor, try to shift click the few items of the same type you just put in the chest into your inventory
Notice it just stacks the items.
Observed behaviour
❌ Using shift-clicking to shift click items while holding the same item type ignores the shift function and instead just stacks the items
Expected behaviour
✔ The items do not stack and it allows you to move the partial stack into your inventory
Fixed in 24w03a.