How we sleep can become a habit. I have friends who swear they can't sleep when their husband travels because they are used to them being in bed with them. (me? I'm happy to have a few nights alone with the remote control, ha ha). But it is all what you are used to.
It's hard to transition kids once they've started this. They have no reason to. So, what kind of reason can you give her to try to stay in her room? Well, you can outfit her room. New night light (even a small lamp left on all night), new cuddly animal or love object, new pillow cover, etc. Make it exciting to her as she helps pick out some things for her 'big girl' room. Then have a reward system in place . . . if she stays for an hour, she gets one bean in the jar, two hours, two, all night, 5. When she gets to 15 (or 10 if it's slow going), she gets a reward like she gets to pick the movie and treat you eat during it on Friday night family movie night (or whatever).
Otherwise, you have to play hardball. Set a firm boundary an stick to it. Walk her back to her room each time she 'shows up'. Ignore screaming and crying. My sister in law and brother in law turned the door knobs backwards on their daughter's room and locked the door from the outside so their daughter would stay put. Baby gate. Etc. And never give in because if you do even once . . . she learned that if she does X (cry, scream, keep getting up) you will eventually cave.
Hang in there. It will get better!