Dogs do not "grow out of" learned behaviors, in fact they get stronger as the dog ages. We can however, always teach dogs new behaviors to replace ones that we don't like. If you really want to change this behavior, simply require him to be outdoors for a few minutes alone, before you go to the door to let him in, or go out to play with him. Dogs are a highly social species and would prefer the company of a social companion over being out in the yard alone anytime. The fact that he comes in willingly, and seeks you out to "check in" when you're out with him, are both great "problems" to have. I don't think he feels unsafe outside by himself, I think he simply prefers your company, and has just learned to come to the door immediately after he's done doing his business because it rewarding for him to do so. All dogs learn through behavior and consequence, and the association of events that happen closely together. In your case, your dog has learned that as soon as he goes potty, he should come directly to the door to be let back into the house.