In previous versions (before 1.21.2), the item count text would render behind item cooldowns. Now half of it (the text but not text shadow) renders in front of it. Attached is a texture pack to help visualize it.
Ways to fix:
Change it back to how it was before 1.21.2 (Make item cooldown render in front of item count)
Make the item count text background render in front of cooldown
Steps to Reproduce:
Equip the attached resourcepack to visualize better
Obtain a stack of an item with a cooldown (Use command below for a long one)
/give @p cookie[minecraft:use_cooldown={seconds:100}] 64
Activate the cooldown on the item
❌ The count text is rendered in front of the cooldown
Does MC-270279 describe your issue?