Can you just close the door?
Jumping when you are not there is probably due to him being a little worried when alone and wanting to have a better vantage point for your return (and hopefully not enough distress that he begins to damage exit routes or household items).
Make sure he has plenty of things to do when inthere such as lots of food dispensing toys, scatter feeding etc.
Work gradually to desensitise him to leaving cues and to your leaving. Dog is behind gate with yummy stuffed Kongs or other great boredom busters. Once he is comfortable with a stage (i.e. no jumping, no distress signaling e.g. pacing, drooling, lip licking, vocalising etc.) move onto the next one.
If at any time he jumps the gate, say 'uh-oh' and calmly bring back in to the right side. Go back and work at the last stage that he was comfortable.
For example the stages may be:
- put your coat on (get your keys etc.), say your leaving cue (e.g. See ya soon) and just stand right beside the gate (but on the exit side). As he stays there toss a few more treats to him
- put your coat on, say your leaving cue, walk to the front door (once within view of dog) and just stand there. As he stays there toss a few more treats to him
- put your coat on, say leaving cue, walk to front door and put hand on door handle, and as above
- as above but open door, just stand there at the open door
- as above, step out through open door and step back in
- as above, step out, close over door and immediatley step back in
- as above have door closed for a two-count and step back in
- as above and gradually increase the count for which the door is closed over e.g. 5 count then 10 count then 20 count and so on
- as above step out and move away from door for 2 count
- as above and increase count for which you are away from door
Move through any stages that you are out of sight very slowly as having to return to him to put him back in will be rewarding to him.
Practice lots and lots and lots so that he gets it. Best of luck