That's a difficult statement. I'm not certain the church has been "judged" to be righteous. Certainly the church has been made righteous by the blood of Christ. I would argue the church is not judged for righteousness sake. No one in the church is righteous, but we have impunity based on the blood of Christ.
Please feel free to explain how believers, the Church, has been made the righteousness of Christ and has not been judged righteous. Believers have died in Christ, have passed from death to life.
Yeah, you and I and God know that we still sin, but positionally and legally, we have been judged righteous. Nobody said we are sinless, but God declaring that pardon for sin that He grants those who believe, in effect declares us righteous.
There are the Jews, the Gentile unbelievers, and the Church, and the Tribulation is for the purpose of bringing the Jews to God and judging the unbelieving Gentile nations for their dealings with Israel. The Church is not the unbelieving Gentile nations and is not part of that.