If Golden Guardian leaves the battlefield before its activated ability has resolved, it won't be returned to the battlefield when the ability resolves.

Artwork
Loading artwork…
Golden Guardian // Gold-Forge Garrison
Rivals of Ixalan · #179 · EN
Nonfoil—Foil—
Card rules
Golden Guardian
4Artifact Creature — Golem
Defender
2: This creature fights another target creature you control. When this creature dies this turn, return it to the battlefield transformed under your control.
4/4
Gold-Forge Garrison
Land
(Transforms from Golden Guardian.)
: Add two mana of any one color.
4,
: Create a 4/4 colorless Golem artifact creature token.
An army of living gold for the golden city.
Rare · Illustrated by Svetlin Velinov
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
Pioneer Legal
Timeless Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If the target of Golden Guardian's activated ability isn't a legal target as that ability resolves, or if Golden Guardian has left the battlefield, neither creature will deal or be dealt damage.
Once Golden Guardian's activated ability has resolved, it will return to the battlefield transformed if it dies for any reason in that turn.