They can be prosecuted but before a case is filed the chief justice have to gave saction just like how any other govt employees prosecution have to be signed by the secretary. But they can’t be prosecuted or sued for their judgements that’s where judicial immunity lies, if you believe they pass a wrong judgement you appeal.