בשגם הוא בשר. חולין קל״ט, ע״ב, דעיקר הבריאה הוא משה רבנו ולא יותר מן ק״כ, ולכך ע״כ אז נעלם מן [העולם], כך לעולם, כי אין בגרת בקבר ושוב הוה התורה נצחית ועומדת.
בשגם is gematria (345) משה.
This gematria is found in tractate Chullin 139b in the name of Rav Mattana who taught:
They also asked Rav Mattana: From where in the Torah is the existence of Moses [Moshe] alluded to before his birth? He replied that the verse states: “For that he also [beshaggam] is flesh; therefore shall his days be one hundred and twenty years” (Genesis 6:3). The numerical value of beshaggam is the same as that of the Hebrew name Moshe, and it is known that Moses lived a total of 120 years (see Deuteronomy 34:7).
דעיקר הבריאה הוא משה רבנו: That the main concept or principle of the Creation is Moshe Rabbeinu.
This is like Rashi teaches to Bereshit 1:1 explaining the meaning of the word Bereshit (בראשית).
בראשית ברא אֵין הַמִּקְרָא הַזֶּה אוֹמֵר אֶלָּא דָּרְשֵׁנִי, כְּמוֹ שֶׁדְּרָשׁוּהוּ רַבּוֹתֵינוּ בִּשְׁבִיל הַתּוֹרָה שֶׁנִקְרֵאת רֵאשִׁית דַּרְכּוֹ (משלי ח'), וּבִשְׁבִיל יִשְׂרָאֵל שֶׁנִקְרְאוּ רֵאשִׁית תְּבוּאָתוֹ (ירמיה ב')
That it is understood to mean: For the sake of Reishit, G-d created the heavens and the earth. That Reishit means both the Torah and Israel.
And in the context of it meaning Israel, Moshe Rabbeinu is equated with all Israel like Rashi explains to Shemot 18:1 in the name of the Mechilta of Rabbi Yishmael.
למשה ולישראל. שָׁקוּל מֹשֶׁה כְּנֶגֶד כָּל יִשְׂרָאֵל (מכילתא):
In this context, the reason why Moshe lived in this world, soul dressed in a body, for 120 years is because of the decree of G-d found in the beginning of the Torah (Bereshit 6:3) long before Moshe Rabbeinu ever appears explicitly, which says:
וַיֹּ֣אמֶר יְהֹוָ֗ה לֹֽא־יָד֨וֹן רוּחִ֤י בָֽאָדָם֙ לְעֹלָ֔ם בְּשַׁגַּ֖ם ה֣וּא בָשָׂ֑ר וְהָי֣וּ יָמָ֔יו מֵאָ֥ה וְעֶשְׂרִ֖ים שָׁנָֽה׃
G-d said, “My breath shall not dwell* in HaAdam forever, in that also (meaning Moshe), he is flesh; let the days allowed them be one hundred and twenty years. This indicates that the time constraint is something intrinsically related to the current state of the body which is made of flesh. It is not eternal.
That like it says in Bereshit 2:7, G-d blew the Living Soul into the body of HaAdam. And in this context it is worth noting that the gematria of Spitting out or vomiting out (הקיא) when including the letters is also 120. This is related to the expulsion of Adam from the Garden of Eden mentioned in Bereshit 3:22-24 which occurred between his 120th and 130th year.
That Gan Eden is a reference to how the written Torah (the 53 parshiyot of the written Torah) has implanted within it the entire oral Torah, which is associated with the word Eden. And so this too continues the association of Torah and Israel.
ולכך ע״כ אז נעלם מן [העולם]: And therefore he was then concealed from the world.
That לעלם has a dual meaning. The first being concealed and the second being eternal.
The Rogatchaver is not saying Moshe died, but that he was concealed from the perspective of this world. This is the subject of the end of chapter 11 in Devarim Rabbah and the interaction between Moshe Rabbeinu, the Angel of Death and G-d.
כך לעולם, כי אין בגרת בקבר ושוב הוה התורה נצחית ועומדת: Thus is the meaning of לעולם, that there is no aging in the grave. And he (meaning Moshe Rabbeinu) returned to the state of being of the Torah, eternal and enduring. Once again alluding to the comparison of the Torah and Israel, meaning Moshe Rabbeinu, like is learned from the very first word in the Torah.
In the context of the language cited from Devarim Rabbah, Moshe goes through the process of being concealed from the perspective of this world in order to acquire his ultimate, perfected physical body, the body of resurrection which is eternal and enduring. And this is the meaning of Isaiah 60:21, which alludes to the same allegory that Rashi mentions in connection with Israel being called Reishit of His produce, and says:
וְעַמֵּךְ֙ כֻּלָּ֣ם צַדִּיקִ֔ים לְעוֹלָ֖ם יִ֣ירְשׁוּ אָ֑רֶץ נֵ֧צֶר מַטָּעַ֛י מַעֲשֵׂ֥ה יָדַ֖י לְהִתְפָּאֵֽר׃
That this perfected, eternal and enduring, physical body will sprout from the earth in which it was planted when G-d resurrects it.