There’s a big difference between forgiveness and exoneration. In the context of your examples, the New Testament is much about exoneration. As a contemporary example, Kyle Rittenhouse was recently exonerated for killing two people. But that does not mean he has been forgiven. That requires letting go of anger, resentment, self righteousness, and hatred. That can be very difficult, and I believe Jesus was telling us that true forgiveness, rather than exoneration, is the key to “salvation” .
And to be clear, I’m no fan of Rittenhouse. Forgiveness does not mean relinquishing accountability.