The last part of Lagrella's ability is a delayed triggered ability that is set up as its enters-the-battlefield ability resolves. It will trigger when Lagrella leaves the battlefield even if it's somehow lost its abilities or become a copy of something else.

Artwork
Loading artwork…
Lagrella, the Magpie
Streets of New Capenna · #196 · EN
Nonfoil—Foil—
Card rules
When Lagrella enters, exile any number of other target creatures controlled by different players until Lagrella leaves the battlefield. When an exiled card enters under your control this way, put two +1/+1 counters on it.
2/3
Uncommon · Illustrated by Donato Giancola
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
"This way" refers to cards entering the battlefield as a result of Lagrella leaving the battlefield.