You cannot execute a critical attack against an ender dragon as you would with other mobs. Knockback attacks while sprinting and sweeping attacks with swords function correctly; however, critical hits are not operational.
Steps to replicate
Enter the End dimension
Respawn the ender dragon if it has been previously defeated
Wait until it ascends towards the end portal or extend your minecraft:player.entity_interaction_range
Attack the ender dragon as you fall.
Observed behavior: No critical hit was executed, evident from the absence of sound and particles associated with critical hits,
Expected behavior: You should be able to perform a critical hit, accompanied by the critical hit sound and visual particles.
Related issues
relates to
Attachments
Comments


Confirmed for 1.20.4.

Can confirm, this affects 24w13a and 1.20.4. I would like to request ownership since the reporter is inactive.