My little guy was doing the same thing for a couple of weeks then he stopped. Don't know why he started doing or why he stopped. He has someone with him 24/7 probably just his playful nature.
I know that if you spray something with cologne most dogs will stay away but then he/she might not pee/poop there so not a good idea. Maybe put toys in his pen so that he has something to play with other than that be patient.