Res judicata bars the parties from filing the suit, whereas sub judice bars the trial between the parties. In res judicata, the suit must be decided in the competent court, but in res sub, the suit must be pending before the competent court.
In the case of Res Sub Judice, the previously instituted suit must be pending in the same court or any competent court having jurisdiction. In the case of Res Judicata, the previously instituted suit must be decided by the competent court in which the issue has been raised subsequently.