I previously lived in a house with its own backyard, so this problem hasn't existed for the past 5 years. My dog had been accustomed to just being let out. However, upon moving to where I currently live (a more residential area in which I have a much smaller yard that isn't fenced in) letting my dog out has become a problem. He'd run out and poop somewhere that I couldn't leave uncleaned, like a neighbor's yard. My attempt at fixing this problem backfired and now he doesn't poop outside at all unless he's on a leash, to the point where he'd rather poop indoors and face a punishment rather than just poop outside in our yard area. Is there any way to fix this problem? Or am I gonna have to start taking him on walks instead of just letting him out? Thank you in advance for your time.