Setting boundaries and sticking to them even under extreme circumstances is the hardest part of modifying a child's less than perfect behavior. Also, with the development of the child is the sense that there are other people in the world and through their natural maturity they realize they aren't made of super hero powers. They begin to manifest other realities...day dreaming or even nightmares as their world broadens and they learn in their own way that they are not solet the worl as us parents have made them for most of their young lives, but rather they are part of a large world out there. Children really have no sense of fear...it develops through everyday life.....
Set limits and stick to them.
That's the bite the bullet part. You're the adult and you must 'take charge', even when you know it's going to create a fuss. For a time you may have to remain in or near her room, but that does not include resting beside her until she falls asleep. Another option is to employ time out if she leaves her bed. You'll still need to be vigilant, of course, but such an intervention underscorse that you mean business. There's no easy way to handle this - it's one of the tough parts of parenting.
but how to keep her in bed when she immediately gets up and runs into our room?
Changes that appear to be small may not actually feel that way from the perspective of a three-year-old. And, when under stress, young children's behavior often deteriorates a bit or regresses. First, check to see if there's anything that you can do to reassure your daughter - i.e., if she has a particular reality-based concern. Then, you'll have to go through a bite-the-bullet phase, when you set the rules around bedtime and stick with them. You are correct in refraining from bringing your daughter in with you or getting into the routine of falling asleep with her. Neither will be useful in the long run. Don't expect this to resolve right away, but over time she will adapt to the routine.