REALLY need advice

Tiana • Mama to a beautiful boy 💙

So my boyfriend and his ex have a kid and we recently grounded her for doing things she's not supposed to be doing at her age. While disciplining her, she decided that she wants to go stay with her mom for awhile. The thing about that is, her mom stays in a house where she is staying to get clean and her mom is more of a friend and let's her do the things she got grounded for. Obviously we can't stop her from seeing her mom. I need advice or we need advice in how to handle it. We are trying our best in trying to make sure she doesn't end up in the same place her mom is in, but going over there her mom lets her do things she's not supposed to.