S.H.
If you keep in mind... that 2 years old is an age of MANY developmental changes, including still having "separation anxiety"... and at this age, they can start to develop "night time" fears and night-mares (which is normal & developmental based)... then you can assist her and comfort her accordingly.
At this age, their sleep patterns/habits also changes many times. This is an age of lots of "growing pains" and changes in them and cognitively as well. So keep that in mind too.
With those things in mind... the important thing, is that parental "expectations" of having a child sleep on their own/by themselves is a big change.... what will make it a nice transition or not, is the "expectations" upon the child's "ability" to transition to a separate room/bed--
ie: if the parent "expects" the child to sleep ALL night in their bed/room, by themselves "without" being "allowed" to adjust IN TIME... then it will be harder. BUT, if a parent "allows" for glitches/regression/the child still waking up during the night/the child still getting up and coming into the Parent's bed etc., then it will be more palatable for BOTH child and Parent.
The key: is that you "allow" the child to adjust... not creating "consequences" or punishment if they have a hard time transitioning to their own room/bed. Just encourage... in a comforting way.
Each child will adjust differently. Some adjust right away, some don't. Even if you get them "special" things for their room that THEY choose... you may still have moments where the child will "miss" you and want you to stay with them in their room... until they fall asleep, or they may resist sleeping, or taking longer to settle down, or may want to come in your room. Which, per the Parent... is "acceptable" or not, or 'allowed' or not. And this will then either "encourage" the child or it will make bedtime a struggle and something the child will not look forward too.
All that being said, most parents along with their child, picks out and buys special things/bedding/decorations for their room, AND a night-light or flashlight they can keep IN bed with them. ALONG with "loveys" and in my daughter's/son's case... LOTS of stuffed animals IN bed WITH them. We let our kids keep whatever they want to cuddle with in their beds. My daughter' calls it her "nest."
And... like many Moms, we told our kids they are a "big girl/boy" and this is their own special room & talked with them about it, asked their opinion, etc.
BUT... like any young toddler, they STILL can get "lonely" in their rooms by themselves and 'scared.' Its NORMAL... because at this age, they do this. Its developmental.
So you comfort them... AND have a regular ROUTINE pre-bed and at bedtime... to help them transition to sleep.
In the case of my kids, even though they have special things in their room and bedding... well, they still will have moments of wanting to be with us in our room. For us, we don't mind. We let them. We have a floor-futon in Our bedroom, where the kids can sleep with us if they need to, or are sick, etc. We are FLEXIBLE about it. So, our kids do NOT resist bedtime and they sleep very well without struggle... whether it be in their beds or not. We don't "force" it and them HAVING TO BE IN THEIR BEDS ALL night.
As a child myself, I would wake during the night too... and creep down the hallway to my parents room and squeeze in between them. I simply got "scared" at night... and my parents let me. Its NO biggie. A child grows out of it.
Each Parent has a different philosophy about it... and different styles about it all... and different "expectations" upon the child. But the whole attitude & "rules" towards it AND towards the child, AND how you expect your child to "stay" in their room/bed or not... will determine how your child transitions to it all. Each child being different. But yes, it takes time. Many weeks or months even. Depending on the child.
All the best,
Susan