In a way all the previous answers are right. The dragon cannot see you if you have the invisibility buff, provided you are wearing no armour and do nothing aggressive. As soon as you do anything that harms the dragon, including hitting the crystals, it will track you, and you will not last long without armour.
Can mobs see you with invisibility?
Invisibility no longer has any associated potions. Invisiblity now functions, and turns mobs invisible. Guardians no longer see players that are invisible from the Invisibility effect.
Why is the Ender Dragon invisible?
3 Beta version causes respawning the enderdragon to act like the first enderdragon battle, releasing the first defeat XP amount, and dragon egg. Respawning it once more causes the enderdragon to be invisible and will only render when the world is reloaded.
Can Creepers see you if youre invisible?
Mobs cant see you when using invisibility potions.
Do invisibility potions work on Shulkers?
Invisibility potions are supposed to reduce the detection range. This doesnt work with shulkers in case the shulker is directly above or below the player.
Can a blaze see you with invisibility?
Blazes and Hoglins can see through invisibility.