Help lol, sleep habits for young child

Lo

So this just occurred to me. My daughter is 4. She’ll be almost 5 when the baby is born. She still comes and sleeps with us, she starts the night in her own room, own bed. Then usually around 3-4am she wakes up and comes into our bed. We’ve tried to get her out of this habit but have been unsuccessful and currently don’t mind but when the baby comes, I don’t want her to keep doing this and not get good sleep because the baby will wake her up. She’ll be in school, so her sleep is important. does anyone have any advice on how to get her to stay in her room? 😭