People with low self-esteem cannot just abandon ("detach from") their source of self esteem. Parents, intimate partners, even friends are not easily convinced that they need to detach just because they recognize that they are in a co-dependent relationship with another person.
One example are parents with "good intentions" who feel guilty about how they parented and take the blame for how their children "turned out". They often do no realize that it is their perceived sense of guilt and self-shaming that keeps them in the "dance of codependency".
Children of all ages may or may not realize that they have "power over" their co-dependent parent, but some do, and they learn at a very early age how to manipulate and use guilt to get what they want from that parent. Children are aware of intimate details of their parents, including weaknesses and "buttons" that may not even be recognized by the parent. This ammunition is then used to manipulate or even control the parent. I have met hundreds of parents in recovery who report an overwhelming sense of guilt and bafflement at how easily they are lied to and manipulated by their children all the while holding themselves up to unreasonably high expectations of how a parent "should be". This a flaw in their thinking.
The actual source of this behavior lies within the parent's sense of self-esteem and self-worth. If you believe that you are a bad parent, it is not your child's responsibility to change, it is yours. If you recognize yourself in this relationship dynamic there is something you can do about it. You can change yourself and your relationships with your children. It may seem counter intuitive to work on yourself if you have a teenager who is struggling, however research continues to support these kinds of efforts for healthy working relationships.