I used a small snib lock on my twins' bedroom door because otherwise they would keep coming out of their room and refuse to go to sleep. I unlocked it if they were ever distressed (and trust me they were not) and when they were asleep. I wouldn't personally leave a door locked overnight for reasons of fire safety, but whilst encouraging her to go to sleep I don't think it is a particularly bad thing. Overnight perhaps you could lock any other doors that present a danger to her instead of her room?