When in spectator mode, any clicks on the dragon have no effect. You don't spectate the dragon, and when dismounting (As if you were on it.) Also does nothing.
You can spectate the dragon with the command:
/spectate @e[type=minecraft:ender_dragon,limit=1]
However, when spectating the dragon, you are rotated the wrong way. You are facing the dragons rear end instead of its head.
Linked issues
Attachments
Comments 3
The first part is MC-46486. Resolving as a duplicate of both of these mentioned tickets.
MC-46486 says that you can move when spectating the dragon. That is not true in my case.
Thelast point is MC-135115.