E.W.
My daughter also tends to act naughty with babysitters. She learned quickly that teenage girls are a lot nicer than Moms and don't know how to or want to discipline.
You could look for older babysitters. Maybe set up trading childcare with another couple.
When I have to use a teenager, before I go I get the babysitter and my daughter together. I tell my daughter (in front of the babysitter) I expect her to ... and I tell the babysitter (in front of my daughter) "you just heard that my daughter said she is going to obey you just like she obeys me. I want you to tell me anything she does that is not obedient." Then I tell my daughter, "If ... "Sally" tells me you did not obey her, ... (name the consequence. Make it one that she actually won't like.) THEN if there are typical misbehaviors, talk about that with the two of them. Like you said she sometimes locks herself in someplace. Say, "if you get angry with a decision sally makes, what are you going to do? Are you going to lock yourself in?" Get her commitment to wise choices. Then say, "I expect you to accept sally's choices. She has to divide her time. She cannot be focusing her attention on you ALL the time." Do this right before you leave, so it is all fresh.
As far as consequences, of course you know best, but if she is mean to the babysitter, then the NEXT time you ahve a babysitter, don't ALLOW her to be a part of that. Say, because you did not treat the babysitter with respect ... either stay in her room or come with you but have to read a book in the corner. Something really boring that causes her to wish she was having fun with the babysitter.
Also, if she gives the babysitter a hard time, then I make my daughter make her a card with an apology, listing the things she did that were naughty and pledging to behave better next time. This makes the babysitter more likely to come back, and teaches your daughter she can't just get away with things like that.