The bug
I tried to attack the ender dragon with a Sharpness sword with an impossible level of Sharpness, but due to MC-158205, she didn't take damage; however, it made enchantment particles (You will see these any time you have a successful attack with a Sharpness, Smite, or BoA item). I was baffled, so I tried with a Sharpness V sword and was able to reproduce it legitimately.
This can be reproduced in other instances as well, but this is the easiest way that I am aware of to reproduce it.
Steps to reproduce
With particles turned on all (might work with decreased also, I didn't test it)
- Get a Sharpness item (doesn't matter the level, it can be a sword or an axe or any item really)
- Attack the ender dragon with the sword
- Wait for
MC-158205to occur (your attack fails due to the extremely buggy dragon hitbox)
--> You will see enchanted weapon particles (teal particles)