Consider your own motivation for your behavior. The most common issue I see in strained relationships with someone acting out is one person trying to have power over another person. This is understandable from a survival perspective, but if we are in survival/protective mode it is much more difficult to also come from a place of love. Doing both simultaneously requires high level skill and in some situations may not be possible.
In general, attempting to have power over another is not loving. It is simply controlling. This especially applies to parenting, but is not limited to that particular relationship. Be willing to carefully consider your need for power. Are you upping the ante as you feel more scared and out of control? If so, that’s understandable but be willing to take a look at it and be open to changing your position.
When someone acts out we get scared. That is the feeling that zooms by so fast that we may not even notice it. Typically the first emotion we become aware of is anger or frustration. Fear is so scary that our brain may protect us from noticing it and immediately cover it with anger. This is a survival mechanism. It is completely normal. And grown up, mature behavior results when we can catch that process, reflect on it and behave purposefully.
Raising your voice, yelling, having a critical tone, upping the ante, blaming, and coldly ignoring another are indicators of fear, even though they may look, sound and feel like anger on the surface. When you do these things you are in a place of fear and you are not operating from your higher thinking brain.
“You won’t learn a lesson if you don’t have a consequence” is a very unfortunate and harmful belief perpetuated by “modern” psychology. (Modern is in quotes to highlight the fact that that particular belief is now outdated and actual science has debunked the previous faulty assumptions.) It is now known to be completely false much of the time. Recall that human behavior is exceedingly complex and that statement is both oversimplified and underestimates human learning potential.