If you target a commander creature with Drillworks Mole's activated ability and that creature is no longer a legal target as the ability resolves, you will not put a +1/+1 counter on Drillworks Mole. Conversely, if the target is still legal, you will put a counter on the commander creature you control, even if Drillworks Mole is no longer on the battlefield as the ability resolves.

Artwork
Loading artwork…
Drillworks Mole
Commander Legends: Battle for Baldur's Gate · #311 · EN
Nonfoil—Foil—
Card rules
2,
: Put a +1/+1 counter on this creature and a +1/+1 counter on up to one target commander creature you control.
1/1
The Flaming Fist soldiers prepared to face a bulette, or worse, but the cause of the rumblings turned out to be much more benign and bizarre.
Uncommon · Illustrated by José Parodi
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions