Time will help. Something else that helps (over the long term) is to always be sure that your child sees you leave and that you are leaving the other person in charge. Sure, at 5 months, she doesn't know what it all means. But you will not do your child any favors if you eventually turn 'leaving while she's asleep napping' into 'sneaking out' so you don't have to see her cry. It undermines her trust if you sneak out.
The other issue is that this doesn't happen daily, so there is no routine for baby. For YOU, yes. You know that every (Tuesday? Thursday? whatever day of the week it is) the sitter will arrive and take care of baby for 4 hours while you go to work. Baby has no concept of the days of the week. If it doesn't happen every day, then it isn't routine.
So... time will help. Your demeanor can help some, too. Though it won't be enough to eliminate her anxiety completely. Separation anxiety is a normal developmental milestone. It means your baby recognizes that you are gone and she wants you back! She loves you! :)
She doesn't forget you when she doesn't see you. So she is upset b/c she can't see you.
I wish I had a magic potion, but sadly, there just is no such thing. Try not to sneak out on her.. hand her off to the sitter and tell her she will be fine b/c "so and so" is going to take care of what she needs until you get back just before dinner.
Over time... as she grows... things will get better.