Righteousness is from God, man and woman of God are human being who are not exonerated from making mistakes. When they make mistakes, it does not mean they are no longer called. God is more worried about His people. Romans 11:29 For the gifts and the calling of God are irrevocable.
When Moses got angry and stroke the rock instead of speaking to it, God did not stop using him. At His own time God will with His servants. Numbers 20:12 Then the LORD spoke to Moses and Aaron, “Because you did not believe Me, to hallow Me in the eyes of the children of Israel, therefore you shall not bring this assembly into the land which I have given them.”