Not exactly the same and it was a long time ago so I'm not sure how well I remember.
My high school bf's parents were both mostly absent drug addicts. I don't think they were outright abusive, his mom obviously loved him but was too wrapped up in her own troubles to act on it. At some point his mom turned a new leaf, got a job, and started being more present in his life. While she wasn't perfect, as no one is, she had been making demonstrable strides towards repairing her relationship with him and providing for him. One night, while returning home from work, she was pulled over for something, I don't remember what, but I do remember it was not because she was intoxicated, and arrested because they found heroin in her car.
She was fired. I don't recall her going to jail but I don't remember that well, I block out a lot of this time. She might have, because it was a violation of her probation and he had to move in with his grandmother. Even though she had probably been using heroin the entire time that she had been making progress, the fact that she was found with it was taken as a sign that she hadn't really progressed at all and she was punished for it, and that punishment was exactly what undid the progress she made.
How the fuck do you expect people to move on with their lives if they're continually set back by things no one can reasonably change overnight, and that through proof of action they're effectively compensating for or maybe even no longer hampered by? I hate that this was supposedly an act of justice when all it did was rewind time and hurt a child who did nothing wrong in the first place.