When holding a item that slows you down when holding right click, when the item is dropped whilst holding right click (Spyglasses, Shield, and more) you still maintain the slowness of that item as if it was used, but no effect is occurring, you don't see the overlay of the spyglass, nor you get protected by the shield, although once you remove right click the effect goes away.
How to reproduce:
Get any item that slows you down when using it.
Press the "Drop" button on your keyboard to remove the item
❌ The item previously held stills slow you down when holding the right click button or the use button and doesn't revert to walking speed unless stopped right clicking or using.
Linked issues
is duplicated by
relates to
Attachments
Comments

Can confirm in 1.18.
Can confirm in 1.18.1.
Can confirm in 1.18.2.

Relates to MC-165381
Can confirm in 1.19.1.

While this bug does not impact vanilla much, it does make usable items difficult in mods in a few ways. Fix seems to be pretty simple, just a patch in both LocalPlayer#drop(boolean) and ServerPlayer#drop(boolean) as those are the last place with access to the use item before it shrinks. See https://github.com/MinecraftForge/MinecraftForge/pull/9344 for a Forge PR implementing the fix.
Did some testing, and the one vanilla gameplay impact I found with the fix is if both the main hand and offhand are usable items, then dropping the main hand item lets you immediately start using the offhand item. I doubt that is ever beneficial in vanilla as you can get the same effect using the scroll wheel, but it is more desirable behavior.

Affects 1.21-pre4

厉害👍

Can confirm in 1.21.3
Can confirm in 1.17.1 rc1