Here is an example creature to show what I mean. It fails to notice that Shadow Breath is a new ability so everything gets added to ability above it. This appears to be related to the brackets in its name but even if i remove all the brackets, it still doesn't pick up the legendary actions.
Adult White Shadow Dragon
Huge Dragon (Chromatic), Typically Chaotic Evil
Armor Class 18 (natural armor)
Hit Points 200 (16d12 + 96)
Speed 40 ft., burrow 30 ft., fly 80 ft., swim 40 ft.
STR DEX CON INT WIS CHA
22 (+6) 10 (+0) 22 (+6) 8 (−1) 12 (+1) 12 (+1)
Saving Throws Dex +5, Con +11, Wis +6, Cha +6
Skills Perception +11, Stealth +10
Damage Immunities cold
Damage Resistances necrotic
Senses blindsight 60 ft., darkvision 120 ft., passive Perception 21
Languages Common, Draconic
Challenge 16 (15,000 XP) Proficiency Bonus +5
Ice Walk. The dragon can move across and climb icy surfaces
without needing to make an ability check. Additionally, difficult
terrain composed of ice or snow doesn’t cost it extra movement.
Legendary Resistance (3/Day). If the dragon fails a saving throw, it
can choose to succeed instead.
Living Shadow. While in dim light or darkness, the dragon has
resistance to damage that isn’t force, psychic, or radiant.
Sunlight Sensitivity. While in sunlight, the dragon has
disadvantage on attack rolls, as well as on Wisdom (Perception)
checks that rely on sight.
Actions
Multiattack. The dragon can use its Frightful Presence. It then
makes one Bite attack and two Claw attacks.
Bite. Melee Weapon Attack: +11 to hit, reach 10 ft., one target. Hit:
17 (2d10 + 6) piercing damage plus 4 (1d8) necrotic damage.
Claw. Melee Weapon Attack: +11 to hit, reach 5 ft., one target. Hit:
13 (2d6 + 6) slashing damage.
Tail. Melee Weapon Attack: +11 to hit, reach 15 ft., one target. Hit:
15 (2d8 + 6) bludgeoning damage.
Frightful Presence. Each creature of the dragon’s choice that is
within 120 feet of the dragon and aware of it must succeed on
a DC 14 Wisdom saving throw or be frightened for 1 minute. A
creature can repeat the saving throw at the end of each of its
turns, ending the effect on itself on a success. If a creature’s
saving throw is successful or the effect ends for it, the creature is
immune to the dragon’s Frightful Presence for the next 24 hours.
Shadow Breath (Recharge 5–6). The dragon exhales necrotic
energy in a 60-foot cone. Each creature in that area must make
a DC 19 Constitution saving throw, taking 54 (12d8) necrotic
damage on a failed save, or half as much damage on a successful
one. A Humanoid reduced to 0 hit points by this damage dies,
and a shadow rises from its corpse and acts immediately after
the dragon in the initiative count. The shadow is under the
dragon’s control.
Bonus Actions
Shadow Stealth (Only in Dim Light or Darkness). The dragon
takes the Hide action.
Legendary Actions
The dragon can take 3 legendary actions, choosing from the
options below. Only one legendary action option can be used at
a time and only at the end of another creature’s turn. The dragon
regains spent legendary actions at the start of its turn.
Detect. The dragon makes a Wisdom (Perception) check.
Tail Attack. The dragon makes one Tail attack.
Wing Attack (Costs 2 Actions). The dragon beats its wings. Each
creature within 10 feet of the dragon must succeed on a DC 19
Dexterity saving throw or take 13 (2d6 + 6) bludgeoning damage
and be knocked prone. The dragon can then fly up to half its
flying speed.
Here is an example creature to show what I mean. It fails to notice that Shadow Breath is a new ability so everything gets added to ability above it. This appears to be related to the brackets in its name but even if i remove all the brackets, it still doesn't pick up the legendary actions.