This is a misconception and if you think about it, it doesn’t make a lot of sense since the two records are generally generated by a system that gets a single value from the user, so it would be a software error if they did not even out.
Accounting errors are normally human errors, e.g. entering the wrong amount or specifying the wrong account, none of which are errors that double entry accounting will catch.
However, double entry accounting gives us an audit trail because it tracks how assets are moved between accounts, so if the balance of an account is not as we expect, we can go back and see exactly why it is what it is.