It seems like this could be comparable to the Braisa that mentions the methodology of Shimon HaAmsuni (can be found in Pesachim 22b, among other places):
כדתניא שמעון העמסוני ואמרי לה נחמיה העמסוני היה דורש כל אתים שבתורה
כיון שהגיע לאת ה׳ אלהיך תירא פירש אמרו לו תלמידיו רבי כל אתים שדרשת מה
תהא עליהן אמר להם כשם שקבלתי שכר על הדרישה כך אני מקבל שכר על הפרישה
עד שבא רבי עקיבא ודרש את ה׳ אלהיך תירא לרבות תלמידי חכמים
As it was taught in a baraita: Shimon HaAmmassoni, and some say that
it was Neḥemya HaAmmassoni, would interpret all occurrences of the
word et in the Torah, deriving additional halakhot with regard to the
particular subject matter. Once he reached the verse: “You shall be in
awe of [et] the Lord your God; you shall serve Him; and to Him you
shall cleave, and by His name you shall swear” (Deuteronomy 10:20), he
withdrew from this method of exposition, as how could one add to God
Himself? His students said to him: Rabbi, what will be with all the
etim that you interpreted until now? He said to them: Just as I
received reward for the interpretation, so I shall receive reward for
my withdrawal from using this method of exposition. The word et in
this verse was not explained until Rabbi Akiva came and expounded:
“You shall be in awe of [et] the Lord your God”: The word et comes to
include Torah scholars, and one is commanded to fear them just as one
fears God. In any case, Shimon HaAmmassoni no longer derived
additional halakhot from the word et.
The implication from Shimon/Nechemya HaAmsuni's statement (before Rabbi Akiva's addition) seems to say that since the expounding of the word 'Es' was done in good faith*, even though he later concluded that it was all in error, he believed he would still receive reward for learning Torah.
Since presumably the Vilna Gaon and others had a sincere and founded belief that the Zohar is a legitimate Torah work, it follows that they too would be credited as having done Talmud Torah, even if ultimately it ends up that the Zohar is proven to not be a 'legitimate' work.
*I'm taking it as a logical assumption that all parties involved acted in good faith. While it's probably beyond the scope of this answer to define what learning in good faith is, I would guess it's something like the scholars reached their conclusions based on legitimate and accepted methods of determining the proper way to learn.