13 really is a rough age... Especially for a girl. It's impending adulthood, crazy hormones and emotions, and all sorts of other things. As hard as it is, you need to try to look past what she's doing, and understand WHY she's doing it. You said she started feeling this way and doing these things about 6 months ago. Do you know if anything has happened to trigger it? Could she be acting out about something?
Where is she going at night? What is she doing? Has she gotten in with a bad crowd? Do you think she is trying to get your attention through this?
How is your relationship with her? Do you have quality time together where you just talk? My suggestion would be to take her out for dinner, just sit and talk with her about anything she wants to talk about. Don't offer any instruction or reprimands right now (at dinner), just let her know that you are there to listen and relate to her. (They don't always need to know what to do. A lot of the time they need to know that someone understands how they feel.) Repeat this talking process as often as you possibly can. Strengthen your relationship with her. She will start to see you as someone she can trust, and start kind of throwing ideas out there to see your reaction, to ask (in her own way) what you think about things. As you gain more trust, she will come to you with problems. Perhaps she will share what's on her mind and why she's been so troubled lately.
In addition to this (and at a separate time from the dinner thing - keep that time sacred), I do think rules have to be stated and enforced. Maybe lay down ground rules again, this time telling her exactly what will happen if she breaks these rules. Don't give her a whole lot. Start very simple, such as NO SNEAKING OUT. If she breaks the rule, in addition to the disciplinary action, she now has to sleep in YOUR room at night. It's not a punishment, it's a protection.
She sneaks out? She has to sleep in your room.
She slams her door disrespectfully? Her door is removed from her room for a week.
You get the idea. It's severe, but it focuses on the solution to "help" her with her problem (the problem of making bad choices), rather than just punishing her so that she's miserable and even more angry.
She needs to understand that your JOB is to protect her and raise her up in the way she should go. I know it is exhausting to have to monitor her every minute when she's in your care. But that might be what has to happen in order to get her back on track. Teenagers actually do NEED to feel safe, and rules make them feel safer whether they admit it or not. Having a strong set of rules that never changes, is enforced, and is for her own good, will help her to feel safer and happier. Again, don't smother her with unnecessary rules right now. Just the really big important ones. Then go from there.