The Augustinian doctrine of justification sees righteousness as something that is possessed as an internal character trait (which is also manifested by outward actions that display and express that inward character). The Anti-Augustinian Protestant doctrine of justification treats righteousness as something that can be possessed in a purely legal way, as a status imputed to a person which does not necessarily flow from or correspond to an internal character. (For more on these two doctrines of justification and arguments relating to them, see here.)
I want to argue briefly here that righteousness is something that must be understood in connection to an internal character trait and cannot be understood in purely legal terms.
Both in the Bible as well as in general human discourse, righteousness is something that is good. It is a positive trait, something that deserves to be praised and rewarded. It contrasts with unrighteousness or wickedness, which is a negative trait deserving of condemnation and punishment. Righteousness is something that is pleasing to God, and which he rewards with good things - ultimately with an eternal life of joy. This all means that we must understand righteousness to be something that is logically and intrinsically connected to happiness. It is fit for happiness. That is really just another way of saying that it is good, for the idea of the good is the idea of something that is pleasing or desirable, something that brings happiness to those who experience it. (And, of course, the opposite of all of this can be said for the idea of badness.) The Supreme Good is God, for God loves and delights in himself supremely and is the source of all delight, and the happiness of all beings in general can only be found ultimately in the enjoyment of God. The natural consequence of loving God supremely is to attain supreme happiness, and the natural consequence of turning away from supreme love to God is to attain supreme misery. When God contemplates a being who loves him supremely, he sees a being whose disposition is one that is naturally fit for happiness, and so he loves that disposition and desires it to achieve what it is fit for, and he rewards it with happiness. When God contemplates a being who does not love him supremely, he sees a being whose disposition is one that is naturally fit for misery, and so he hates that disposition and desires it to achieve what it is fit for, and he punishes it with misery. (Since God is a simple, indivisible being, his knowledge and will are ultimately one. God's ultimate desires are identical with what ultimately is, and, when we speak of God, there is no ultimate distinction between moral rewards and punishments and natural or logical good or bad consequences.)
If all of the above is true, then righteousness can be nothing other than the disposition of a being who loves God supremely, and wickedness is the disposition of a being who doesn't. Righteousness is the orientation of the will of a being towards God as the Supreme Good, and wickedness is the orientation of the will of a being away from God as the Supreme Good. This is what both reason and revelation teach (see, for example, Luke 10:27; Matthew 22:36–40; Mark 12:28–31; James 3:9-12; Romans 13:8-10; Galatians 5:13-14). But such a disposition of the will is, by definition, an internal character trait within a being. It cannot be possessed merely legally or be a merely legal trait. For God to see a person as righteous is for him to be pleased with a person and see that person as fit for the reward of happiness, but the only thing in a person that could be thus pleasing to God is the orientation of the being's will towards God, for that is the only thing that naturally attains and is fit for that reward and which God therefore sees as something ultimately good and delightful. To imagine righteousness as being possessed by a person in a merely legal way, without reference to the actual internal state of the will, is like imagining that a person could be physically beautiful merely by legal imputation. Righteousness is the beauty of a good will, and the only thing that can possess that kind of beauty is a good will. If a person has that kind of will, God will be pleased with its beauty; if he has a wicked will, God will find that will morally ugly. Just as a person who is physically beautiful will give the pleasure of physical beauty to onlookers. A person who is physically ugly cannot become pleasing to onlookers merely by having beauty legally imputed to him, or vice versa. Or, for another analogy, we can think of a person enjoying the taste of a certain food. If I eat something that is tasty, I will experience pleasure in the taste of it. This is because there is a logical connection between a food being tasty and that food giving the pleasure of taste to those who taste it. Good taste cannot be possessed by a food in merely a legal way. A substance or object with a disgusting taste cannot come to be enjoyed merely by having tastiness imputed to it. It will produce the sensation natural to its nature. I cannot take a lump of dirt, legally count it as possessing the tastiness of chocolate cake, and then enjoy it as if it is chocolate cake. The only way it will taste like chocolate cake is if it actually possesses the taste of chocolate cake.
So the Anti-Augustinian Protestant doctrine of justification makes a fundamental error when it tries to separate righteousness and wickedness from the good or bad dispositions of the will which are the natural source of these ideas and turn them into qualities which can exist purely legally. This makes no sense on biblical grounds, on the ground of ordinary human discourse, or on the ground of sound theology and philosophy.
ADDENDUM 5/5/23: But can't righteousness and wickedness be possessed in terms of one's past record? Isn't one guilty not only for what one now is, but for what one has done in the past, and likewise with desert of reward?
If we keep in mind what we already established above, we can see that a record is only important as a way of keeping track of the specific manifestations of a being's will which help us to identify what the state of that will is. This is why we treat moral subjects differently from non-moral subjects even when they "commit" similar acts. For example, imagine a tornado destroying someone's house vs. an arson destroying someone's house. The outward act and the result are similar in both cases, but we don't set out to apprehend and punish the tornado as we do the arson. Why? Because the acts of a tornado do not manifest any evil will, whereas the acts of an arson do. We see the act of the arson as a manifestation of an evil will, and we seek to apprehend the being who has that will so that he can receive his proper punishment. We punish the man not ultimately because of the outward act itself but because of the internal disposition of will that was manifested in the outward act.
"But," it might be objected, "if a person commits an evil act but then later repents and changes, so that his will no longer possesses the evil orientation it previously had, we still want to punish him. Doesn't that indicate that we are wanting to punish something other than the evil will?" No, I don't think it does. If that were the case, again, we would want to punish a tornado just as much. I think what we are recognizing in such a case as this is that evil deeds have negative consequences that have to be faced. A person cannot commit an evil deed and escape the consequences of that deed by repenting. In fact, the repentance of an evil will inherently involves a facing up to those consequences and accepting them and choosing to do what one can to make up for the damage done. That is why repentance involves feelings of guilt and sorrow and is often accompanied by an attempt to repair the damage caused by the previous evil act (helping to rebuild the destroyed house, giving back what was stolen, etc.). (In Catholic theology, it is explicitly recognized that repentance involves deeds of penance. This is something we all recognize but Catholicism gives a theological name to. In the Bible, this is expressed by saying that in order to rise to a new life of righteousness, we must die to sin. We must deny ourselves, crucify our old lives, put to death the deeds of the flesh, suffer with Christ so that we might be glorified with him, etc. - Romans 6; Romans 8; Romans 8:17; Galatians 2:19-20; John 12:24; Matthew 16:24-25; etc.) So we naturally have an aversion to the idea of an evil will escaping from having to face up to the consequences of what it has done. But this does not imply that we find anything morally ugly ultimately other than a wicked will. (And, again, the same can be said in reverse with regard to a good will and acts of that good will.) It is simply a recognition that the transition from an evil will to a good will - repentance - involves dealing with all that the evil will entailed, or the consequences of that evil will and its acts. (For more, see here.)