She can still see you in the pen. I have always put them behind a closed door for about ten seconds, which is plenty long for a pup, just not long enough to get into trouble behind closed doors. it has worked very well.
The punishment should be time out (of sight). Good luck with your pup.
Deja, GSD, sable WL, female, born 11 / 2013
Cam, Rough Collie, sable, male, born 8/2015