Here "righteous" refers to God's ability to make people right with him. You can translate this in an active form. Alternate translation: "When God declares a person right with him, that person is no longer controlled by sin" (See: [[rc://en/ta/man/translate/figs-explicit]] and [[rc://en/ta/man/translate/figs-activepassive]])