Locking the door.

At night time I lock the doors to my sons room, we have a connected bathroom that locks from inside the bathroom, and he has his own door to the hallway, directly in front of the stairs. He knows how to open doors now, but if they’re locked he can’t get them open. I am deathly afraid of him getting out at night and falling down the stairs. My SO thinks it’s child abuse to lock the doors at night. I think if anything it’s the opposite, I’m making sure he’s safe. I also think it’s safer because if someone where to break in they wouldn’t be able to get into his room, they’d have to go through mine first. I’m just asking for an opinion on this really, my SO treats me like shit over the door being locked, he literally just walked past me and was like “I can’t believe you’d lock him in his room like this” it’s literally bed time, I don’t want him getting out of his room??