When he’ll stay sitting, touch the knob. Click/treat. Jiggle the knob. Click/treat. Repeat, clicking and treating each time, then open the door a crack. If your dog doesn’t move, click and treat. If he gets up, say “Oops!” and close the door. You’re teaching him that getting up closes the door; if he wants the opportunity to go out, he must wait.
Gradually open the door in one or two-inch increments. Any time he gets up, “Oops!”/close the door/try again. Do several repetitions at each step. When you can open the door all the way, take one step through, stop, turn around and face your dog. Wait a few seconds, click, then return and treat.
When he’s solid with you walking out the door, occasionally invite him to go out ahead of, with or after you, by using a release cue such as “free.” Other times, walk through the door and close it, leaving him inside. Once the door closes, he’s free to get up and move around. You can give your release cue through the closed door, or simply leave him to figure out it’s okay once you’re gone. He will figure it out.
Finally, teach everyone who interacts with him how to ask for the “Wait” at the door. The more consistent everyone is at reinforcing the sit-and-wait, the more reliable your dog will be at waiting, and the less likely he’ll be to dart out that door. Thus, the safer he’ll be and the more easily you’ll breathe. And that’s a winning combination.