This bug may also occur when Parrots are on Players' shoulders. So they may not leave Players' shoulders while Players hurt, which is different from Java edition
The sound events defined in sounds.json was only sent to the client and resolved into a client-side content.
Therefore, it is not a registry and cannot read by datapack. This issue might not easy to solve unless sound events were data-driven.
In 1.21.30 they're chainmail boots, while in 1.21.40.23 it's a golden apple.
I don't know whether it will always shift into the same item in the same version.