⚠️ As of since at least 18w49a, the boss bar does not show up if your render distance is below a certain value, dependent on your distance to 0/0, which can cause trouble if you don't know that when testing for this bugpost.
It was not the case in an older snapshot version.
This does apply to naturally spawned as well as summoned (via commands) dragons, even if you're in their direct vicinity.
See also this comment
Several EnderDragon issues, I don't know if anything relates to each other, thus I'm listing them all: MC-105976, MC-105980, MC-105981, MC-105983
1) When I tested boss bars in the first 1.11 snapshot, I noticed that only the Legacy/original EnderDragon seems to have a Boss Bar rightaway, and those Dragons who get summoned with EndCrystals.
When I summoned a dragon with the command
/summon ender_dragon ~ ~ ~
it didn't have any boss bar.
Upon relogging into the world, there was all of a sudden a boss bar.
Edit: I don't know what bugs I posted relate to each other, but as this bugpost here is assigned and I find it important to be fixed (mentioned in MC-105983):
An EnderDragon does not have boss bar in the Overworld at all, only in The End.
A CUSTOM NAME does work for EnderDragons in the Overworld, it shows up above them in the Overworld, just not as boss bar.
Also: If you got several EnderDragons at the same time, it will only show 1 single boss bar (MC-105983)
Whole client output for the dragon that was summoned via command:
[17:55:16] [Client thread/INFO]: [CHAT] Entity data updated to: {HurtByTimestamp:0,Attributes:[0:{Base:200.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.699999988079071d,Name:"generic.movementSpeed"},3:{Base:0.0d,Name:"generic.armor"},4:{Base:0.0d,Name:"generic.armorToughness"},5:{Base:16.0d,Modifiers:[0:{UUIDMost:-3593038383422355857L,UUIDLeast:-7329695741790552044L,Amount:0.005276639092973522d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],Invulnerable:0b,FallFlying:0b,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,DragonPhase:10,DeathTime:0s,HandDropChances:[0:0.085f,1:0.085f],PersistenceRequired:0b,Motion:[0:NaNd,1:NaNd,2:NaNd],Leashed:0b,UUIDLeast:-6586079442792380665L,Health:200.0f,LeftHanded:0b,Air:300s,OnGround:0b,Dimension:1,Rotation:[0:-3.5f,1:0.0f],HandItems:[0:{},1:{}],ArmorDropChances:[0:0.085f,1:0.085f,2:0.085f,3:0.085f],UUIDMost:6281808638182441113L,Pos:[0:14.161960877119544d,1:72.89637543180132d,2:20.846838001748843d],Fire:0s,ArmorItems:[0:{},1:{},2:{},3:{}],CanPickUpLoot:0b,HurtTime:0s}
Linked issues
Attachments
Comments 8
@unknown Okay!
@unknown Not for me!
[media]Can confirm in 20w48a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.

The boss bar doesn't return even after relogging now. (yes in the end dimension)
Change the title to "Ender Dragon summoned via command doesn't have a boss bar"
Yes, please. 4 issues = 4 tickets.