When trying to empty a bucket in spawn protection, client-side the action succeeds, but it fails server-side. However that is not communicated to the client, causing a desync.
To reproduce
Emptying
Start a server
Join the server
Op any player other than you (from the console) to activate spawn protection
Give yourself any bucket (water, lava, powder snow, fish, axolotl)
Try to empty the bucket
→ ❌ Nothing happens but the bucket gets emptiedClick on the bucket in your inventory
→ ❌ The bucket is full again
Picking up
Start a server
Join the server
Op any player other than you (from the console) to activate spawn protection
Give yourself an empty bucket
Try to pick up water or lava
→ ❌ The block is removed and the bucket gets filled
→ ❌ The removed block does not update (similar to MC-12363)Click on the bucket in your inventory
→ ❌ The bucket is empty again
Related issues
discovered while testing
Attachments
Comments

Can confirm in 1.17.1.
Can confirm in 1.18.1.
Can confirm in 1.18.2.
Can confirm in 1.19.