Our dog is the same way. If we put him in his crate he lays down and goes to sleep. If we leave him out while we go outside, he loses his mind. He also seems to know when we're leaving because he heads over to his crate, lays down, and waits for me to shut the door and give him his treat.
My dog stands right by the door or follows me around while I have my keys in my hand. I need to start giving him a treat when he goes in his cage so his anxiety will drop before I leave....good idea! haha