This is the wording of the Zohar there: His tefillin are according to the order of Havayah, which is "Kadesh Li," "Ve-hayah Ki Yeviacha," "Shema," "Ve-hayah Im Shamoa." But in the world to come, the Havayot are in the middle, for they are H' H'... Thus far his words. And he elaborated on this, see there. And in my humble opinion regarding its explanation: Behold, at the end of the third chapter of Pesachim, our sages, of blessed memory, said that in the future to come, they will say the name Havayah as it is written. And this is what is written: "On that day Hashem shall be one and His name one." Because then there will be the nullification of the evil inclination, as it is written: "They shall not hurt nor destroy," and automatically the troubles will also cease, as is known. Therefore, now "Ve-hayah Im Shamoa" is last, for in it is written "Take heed to yourselves, lest your heart be deceived... and you perish quickly..." This is not the case in the future to come—"Shema" will be last, in which is written only the love of Hashem, and it contains no punishment. And this is what the Zohar says in Parshat Bo, the fourth parsha: the secret of harsh judgment, as is explained to the one who understands. And in "Pinchas" it says that in the future to come the Havayot are adjacent to each other, meaning: that the two "Ve-hayah" sections are next to each other, because in the letters of "Ve-hayah" is the entire name Havayah. And in the future to come they will be next to each other, for they are H' H', meaning Havayah Havayah, for just as it is written, so it is read. And there is a hint to this in the Shin, for "Kadesh" and "Shema" which are next to the Shins of the shel rosh, together have thirteen heads like the numerical value of "Echad," as it is written: "On that day Hashem shall be one and His name one." It turns out that according to this, both are true according to the intent of the Torah. However, in this time it is more correct like Rashi, because of the reasons we stated. Therefore the Baraita said "Shema" "Ve-hayah"—"Shema" from the left, for now it will be explained "Shema" first and afterwards "Ve-hayah Im Shamoa." And in the future to come it will be explained "Shema" "Ve-hayah Im Shamoa" from the left, meaning: from the left will be "Shema" and afterwards "Ve-hayah Im Shamoa." And that is to say that "Shema" will be at the end and the Havayot in the middle.
וזה לשון הזוהר שם: תפילין דיליה כסדר הוי', דאיהו "קדש לי", "והיה כי יביאך", "שמע", "והיה אם שמע". אבל בעלמא דאתי הויות באמצע, דאינון ה' ה'… עד כאן לשונו. והאריך בזה, עיין שם. ולעניות דעתי בביאורו: דהנה בסוף פרק שלישי דפסחים אמרו חכמינו ז"ל שלעתיד לבוא יאמרו שם הוי"ה ככתיבתו. וזהו דכתיב: "ביום ההוא יהיה ה' אחד ושמו אחד". מפני שאז יהיה ביטול היצר הרע, כדכתיב: "לא ירעו ולא ישחיתו", וממילא שגם הצרות יכלו כידוע. ולכן עתה "והיה אם שמע" האחרונה, דבה כתיב "השמרו לכם פן יפתה לבבכם… ואבדתם מהרה…". מה שאין כן לעתיד לבוא – תהיה "שמע" האחרונה, שבה כתיב אך אהבת ה', ואין בה עונש. וזהו שאומר הזוהר בפרשת "בא" פרשה רביעאה: רזא דדינא קשיא, כמבואר למבין. וב"פנחס" אומר דלעתיד לבוא הויות להדדי, כלומר: ששני "והיה" סמוכים זה לזה, משום דבאותיות "והיה" יש כל שם הוי"ה. ולעתיד לבוא יהיו זה אצל זה, דאינון ה' ה', כלומר הוי"ה הוי"ה, דכמו שנכתב כך נקרא. ורמז יש לזה בהשינ"ן, ד"קדש" ו"שמע" שהם אצל השיני"ן דשל ראש, ויש בהם ביחד שלושה עשר ראשים כמנין "אחד", כדכתיב: "ביום ההוא יהיה ה' אחד ושמו אחד". ונמצא דלפי זה שניהם אמת לפי כוונת התורה. אלא דבזמן הזה יותר נכון כרש"י, מפני הטעמים שאמרנו. ולכן אמרה הברייתא "שמע" "והיה" – "שמע" משמאל, דעכשיו יתפרש מקודם "שמע" ואחר כך "והיה אם שמע". ולעתיד לבוא יתפרש "שמע" "והיה אם שמע" משמאל, כלומר: משמאל יהיה "שמע" ואחר כך "והיה אם שמע". והיינו ד"שמע" יהיה בסוף וההוויות באמצע.