It is often tempting to exit a trade if it approaches a take profit level but never quite makes it.
Statistically speaking, you will be better off if you "sit on your hands" and avoid that temptation, even though in this case it could have prevented a loss.
Some losses are inevitable.