Undying reads: 'When this creature dies, if it had no +1/+1 counters on it, return it to the battlefield under its owner's control with a +1/+1 counter on it.' The key phrase is 'if it had no +1/+1 counters on it' at the moment it died. This is a condition checked as the triggered ability resolves (technically, it is checked as part of the trigger condition when the creature dies). If the creature already had one or more +1/+1 counters when it died, the undying ability simply does not trigger at all.
This is confirmed by CR 702.93a, which defines undying explicitly with that condition. Because the ability never triggers (or if it does trigger in some edge cases, the condition fails), the creature stays in the graveyard and does not return to the battlefield.
A common in-game scenario: you control a Young Wolf (a 1/1 with undying). It dies for the first time with no counters, so undying triggers and it returns with a +1/+1 counter, becoming a 2/2. If that 2/2 Young Wolf is later destroyed, it now dies with a +1/+1 counter on it — undying does not trigger, and it stays in the graveyard permanently.
Be careful with effects that add +1/+1 counters to undying creatures before they die — doing so 'uses up' their undying. Conversely, removing the +1/+1 counter from an undying creature before it dies can restore its ability to come back.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.