Unfortunately the description you have offered is all too common. It is typical for the number of residential rehabilitations to be several in number (some sources pointing to more than a half dozen) before a successful take happens. Typically, mental health issues are concomitant concerns and evaluated for as part of the process.
I wish there was an easy answer, but the brief stays combined with withdrawal issues and the new living situation often doesn’t allow for an accurate assessment. Sometimes the legal complications can actually help — if the rehabilitation is mandatory. This allows for a longer stay and for support services to be coordinated once the individual is released.
I would highly recommend Nar-Anon or Al-Anon for you and your family in coping with this ongoing problem. They have support and decades of wisdom to offer as you cope with your stepdaughter’s behavior.