One of the most common training mistakes is assuming that a behavior learned in a quiet room will automatically work everywhere else. Dogs don't generalize skills as easily as people do.
The room is part of the lesson
A dog sitting calmly in your kitchen has very little competing for their attention. Outside, there may be birds, bicycles, children, smells, other dogs, and dozens of unfamiliar sounds.
Expecting the exact same response in both environments is like learning to solve a puzzle alone and then being surprised when you struggle while someone is shouting questions at you.
Increase difficulty gradually
Start with the behavior in a quiet environment. Once your dog is reliable there, add a mild distraction. Then increase the distance, movement, noise, or duration one variable at a time.
For example, practice a recall inside. Then try the same recall in a quiet yard. Next, add a few mild distractions. Only after those steps are going well should you expect the behavior to hold up at a busy park.
When your dog stops responding
Don't assume your dog suddenly forgot the cue. The environment may simply be harder than their current skill level.
Make the exercise easier, increase the reward, reduce the distance, or move somewhere quieter. Good training isn't about proving that your dog can cope with difficulty. It's about building enough successful repetitions that the difficulty becomes manageable.