Opportunistic habits show up when the setting makes them easy. While the cue is new, manage the space with a leash or a baby gate so your dog cannot keep practicing the unwanted pattern.
Teach the cue with rewards first. Once your dog knows it, interrupt with a calm, fair correction, redirect into the behavior you want, and reward that choice right away.
