When my son was in his teens and very stroppy, (Big argument... he thought I was very unreasonable that I needed to be informed if he was going to be late etc), I told him there was nothing he could do that would stop me loving him. However, if he behaved badly there would be consequences. For example, if he killed someone, I would inform the police, but would be there throughout the process, visit him in prison and be there for him when he came out of prison. Very dramatic, but then I was dealing with a dramatic teenager. I explained unconditional love means loving the person, but does not mean colluding with bad behaviour. I also told him that it was my job as his Mum to worry about him because I loved him and that keeping me in the loop and being considerate as in all his relationships was important. I pointed out that when his Dad asked me if I minded him going out with his friends, he wasn't really asking my permission. He didn't need that, but it was a nice way of letting me know where he was so I wouldn't worry.
This conversation was a turning point for us and our relationship ever since, which is why I remember it. I feel I did some good parenting that day, but believe me, I didn't all the time. Sometimes you really have to spell it out clearly. He was more considerate and thoughtful, because he understood why it was necessary. He is now married happily and a father, with another on the way. My DIL has told what a wonderful man he is. I like to feel I had a hand in that!
Before I retired, I was a teacher. I found it helpful in my mind to separate the child from their behaviour, particularly when their behaviour was challenging. This stopped me from reacting as if it was a personal attack. I was able to see bad behaviour as a symptom of something else, which helped me stay calm and non judgemental. It is easier when they are not your own children and you are not so emotionally involved of course. I've used this when dealing with unpleasant behaviour from adults. It helps not to take things personally. People often react to past pain rather than to the present, which explains why people read things into something where it was never intended.
Anyway, I'm hoping some if this ramble might help in some way.