Hugs to you girl! If it's any consolation, transition to a BB is tough!
First off, I don't think locking him in is such a good idea. I know you don't want him running around at night, but I think locking a child in can cause more fear and anxiety than it's worth. What I'd opt for instead is a baby gate in the door. Do it on the jam so that you can still close the door without interference, but when the child opens the door they can't get out because of the gate. They can then call for you from the doorway and you don't have to worry about them running around at night!
I think what we need to work on here is taking away the fear and anxiety that your DS is now associating with his room and bed. The best method for this, I think, would be GW. WI/WO won't be too effective to start with, as you need to help your child learn to stay in bed when it is time to go to sleep. After a few days of GW, then WI/WO might be worth a try.
GW (Gentle Withdrawal) starts wtih you sitting in a chari by the child's bed. I want you to take this slow, so for 3 days you are going to sit right by your child's bed until he falls asleep. If he wakes when you try to leave, you're going to have to start over.
We stay in each position for 3 days, and then we gradually move your chair closer to the door. The timing of this is going to depend on your child. In other words, you may find after 3 days near your child's bed that he is calming enough and happy enough that you can then start a WI/WO sort of plan. Or, you might find your child is still fearful and unhappy, so moving your chair just a little towards the door is what will work.
The main thing is to follow your child's cues and take the LONG view of this. It will not take 1 night to fix. But, in 2 weeks time you will either have this problem completely fixed or you will have made incredible progress towards that goal. In other words, take some of the anxiety/frustration out of the equation for YOU by just facing the fact that this is something that will take a little while to fix. Change is hard toddlers, and this is a very big change! While they crave freedom, it is also very scary. To be able to get in and out of bed at will is overwhelming to some little ones, especially those of a touchy or spirited nature. We are going to show him that his room is safe, that mama and dada will always be there for him when he's frightened or worried, and that beds are for sleeping.
You might also try to get some "Big Boy" sleeping items to encourage him in this change. Some sheets with a favorite character, a new pillow/pillow case with characters, and perhaps a stuffed animal that can act as 'sentry' while he's sleeping -- someone he can hug and talk to when he gets frightened. You might also give him a child's flashlight to use.
You may also need to relax some of your ideas about how bedtime will go. He's no longer a baby, and is quickly becoming a child. So, I think that if you can show him that his new BBB comes with certain privileges that might also help things along. IN other words, you can put him in bed 15-20 minutes earlier than normal (he can't read a clock, so how will he know!
) and tell him now that he's a big boy he's allowed to read using his flashlight in bed for 15 minutes. What a fun adventure for a child! You can also use a 'reward chart' to encourage him to stay in his bed and not call for you. That's why we're giving him a flashlight and a 'sentry' stuffed animal -- he can use those to reassure himself rather than calling for you. With the reward chart, I'd probably start off simply by giving him a sticker for every night that he stays in his bed at bedtime and falls asleep on his own, without your help. After 3 stickers he earns a 'reward' (make it pretty small). Then, I'd give him stickers for sleeping thru the night without calling to you. Again, 3 stickers earns a reward. We don't want to make him have to earn too many stickers before the reward, or he might get discouraged.
Give these ideas a try for a few days and let me know how you get on! Remember, this is a difficult transition for him. Help him by giving him the support he needs, letting him know that no matter how disconcerting the changes in his life that you will always be there to help him thru it. Also show him that he *can* do it; the reward chart will help reinforce that notion.
Good luck!