Steps to reproduce the issue
Put a diamond sword and a diamond spear in your hot bar
Hold the diamond sword and wait it for full charging
Switch to the diamond spear and left click as soon as possible
Expected result
Spear can only deal damage when it is full charged, but switching items doesn’t recharge the attack cool down. This might be an old bug.
If you enchant a fire aspect on the spear, you can ignite the target when you attack following the steps. This can be found in MC-28289.
Actual result
This technique may be abused in PVP to deal full damage from a greater distance in combat
Environment
Windows 11
Minecraft 25w41a
Duplicate of MC-28289.