Many years ago, I had a German Shepherd who was the same way: he'd never poop in front of us. Pee was OK, but no poop. When I had to take him for walks (as opposed to just opening a door to the back yard), we'd use a long leash and turn our backs, then he'd go. Once, I tried to turn around before he was done, but he was looking over his shoulder and stopped mid-poop

.
Never did find out why he was that way ...
I hope you figure out the answer for your pup.