As far as I understand the subject, the Rebbe did not teach the idea that he would be considered to have fulfilled the halachic status of "Moshiach with certainty" (מָשִׁיחַ בְּוַדַּאי) even up to this day. According to the Rebbe's teachings, this cannot occur until after the resurrection of the seven Shepherds and the eight Annointed Individuals.
The idea that he met the criteria to be considered "presumed to be Moshiach" as outlined by Rambam in the Mishnah Torah, Hilchot Melachim, chapter 11 is in keeping with the Rebbe's teaching.
This concept of the halachic status of Presumed to be Moshiach as it applies to the Rebbe is built upon the halacha sefer, Yechi HaMelech which carries the approbation of Rabbi Moshe Feinstein among many others. This didn’t even begin to gain ground until 1984. The Rebbe first acknowledged the book’s existence in 1992 as printed in his approbation to the 2nd edition. It is also worth noting that the Rebbe discouraged pushing this view in places that were not receptive to it.
The Rebbe did not teach that halacha (Jewish law, like is found in the Mishnah Torah of Rambam) was to be understood in any way other than according to its plain meaning. And with that said, the second half of Halacha 4 in Hilchot Melachim, chapter 11, meaning building the Mikdash in its place (on the Temple Mount in Jerusalem) has not be fulfilled yet.
For those Lubavitchers who mistakenly claim that the halacha you cite in your question:
וּבָנָה מִקְדָּשׁ בִּמְקוֹמוֹ
means 770 Eastern Parkway in Brooklyn, New York because it is possible to read "בִּמְקוֹמוֹ" as in his place (the place where Moshiach happens to be located at any given time), they are in disagreement with the principle of following the plain meaning as taught by the Rebbe concerning this halacha. (For details of this see Kuntress Davar Malchut: Chiddushim u'Biurim b'Hilchot Melachim, Chapters 11-12, published 2 Iyar, 5751)
The word “מקדש” is masculine and in the context of the sentence (meaning requirements that pertain to acquiring the status of Moshiach with certainty), “מקומו” means it’s place (the place of the Mikdash) in Jerusalem, not his place (meaning wherever Moshiach is found).
It is worth noting that the Rebbe does differentiate and state that following the plain meaning of Rambam regarding acquiring the halachic status of Presumed to be Moshiach, those laws can pertain to his place, meaning his geographic location. He mentions this specifically in the context of fighting G-d's wars in order to acquire the status of Presumed to be Moshiach.
Regarding the status of Moshiach with certainty the text states, “Moshiach will build the Mikdash in its place” and after that gather in the exiles, etc.
The plain meaning is that Moshiach will, after he is presumed to be Moshiach according to halacha build the third Temple in its place, and only after that will the Jewish exiles outside of Israel be gathered into Israel and Jerusalem.
But historically, the Jews of the Soviet Union were leaving under Prime Minister Gorbachev in the early to mid 1980s. The placing of the foundation stone (Even HaPinah) by the Rebbe was in late August of 1988 (which is not in keeping with the Rebbe's explicit teaching that Moshiach's participation in the actual construction would be the final act which completes the construction, not the first). And the lifting of all emigration restrictions was in 1989.
In fact, the Soviet Union collapsed in 1991 long after the Jewish emigration from there was in full swing .
And everything associated with the Gulf War and how 770 Eastern Parkway was equated with the Mikdash, like is mentioned and cited explicitly by the Rebbe quoting the Yalkut Shimoni on Isaiah took place in 1991 and 1992.
This means that the chronological order is wrong for the status of Moshiach with certainty according to the plain meaning. What happened historically is not the clear fulfillment of the halachic requirements for anyone, including the Rebbe, to be Moshiach with certainty.
So how is all this to be understood according to the teachings of the Rebbe, who appears to be presumed to be Moshiach ?
The Rebbe did teach, like all the Rebbe's before him, that everything which exists in the physical, has its precursor and source in the spiritual.
This is nothing unique to Lubavitch. It is a consistent principle in Torah throughout the ages.
In the Torah of Moshe Rabbeinu to parshat Bereshit and the commentaries there, this is the reason behind the basic repetition in Bereshit about the story of creation, the first time with G-d’s name, Elokim and the second time with HaShem Elokim. The beginning is the spiritual precursor and the second is the literal, physical expression according to the plain meaning.
In the case of the building of the Temple in its place, meaning on the Temple Mount in Jerusalem by Moshiach, the spiritual precursor to its literal, plain fulfillment was the laying of the cornerstone to 770 by the Rebbe himself. There is an interesting and relevant discourse connected to this idea found in Sefer Karnayim by Rabbi Aharon of Kardina and the commentary Dan Yadin of Rabbi Shimshon of Ostropolia, Discourse 14 and also in Sefer Kehillat Yaacov by Rabbi Yaacov Tzvi Yolles, ערך מצפ״ץ.
The source for this concept was explained in the Rebbe's kuntress entitled, "Mikdash Mi'at Zeh Beit Rabbeinu she'ba'Bavel" from 20 Marcheshvan in the year 5752. But it is not the plain fulfillment of the law mentioned above.
In a similar fashion, the ingathering of the exiles mentioned in halacha has a spiritual precursor.
This is why the ingathering of the exiles appears before the return of the (nascent) Sanhedrin, the rebuilding of Jerusalem including the third Temple, and the full reestablishment of the monarchy of David through the "sprouting" of Tzemach David in the Amida prayer (meaning the Shemonah Esreh).
The order that appears in the Amidah is not identical to the order in halacha as found by Rambam in the Mishnah Torah. And those differences are discussed extensively in Kabbalistic writings and in Chassidic teachings, in particular within Chabad Chassidut.
This spiritual ingathering is supposed to be the ingathering and final tikkun, or "elevation of the Sparks of Holiness" from all of the mitzvot done by everyone from the beginning of creation until the completion of the process called "birrur HaNetzutzot".
This process is also described in other places as the reason for going into exile. The Jewish people went into this exile in order to gather these sparks.
But this principle and this language is nothing new. It is the same language and teaching we have in regard to the first exile of Egypt and the first redemption with Moshe Rabbeinu. When the Jewish people left Egypt, it was empty like the bottom of the ocean. The sparks had been collected and taken out from there.
This is also the teaching of the Alter Rebbe as found in letter 130 of volume 1 of Igrot Kodesh of Rabbi Shalom Dov Ber, the 5th Rebbe. The Alter Rebbe is explaining there the view of the Ari z"l as found in Eitz Chayim.
But this is also not unique. It is also the teaching referred to by Rabbi Moshe Chaim Luzzato as found in section 2 of Derech HaShem, Hashgacha HaIshit (Divine Supervision of Human Beings), section 8 which says:
ואולם סידר האדון ב״ה שהשלימים וחשובים יוכלו לתקן בעד אחרים וכמ״ש ותפגע בהם מדה״ד תחת פגעה בכלל העולם ואמנם כיון שהם בעצמם שלימים וראוים לטוב שהם מתיסרין רק בעבור האחרים ודאי שתתפיס מדה״ד במועט בהם כמרובה בחוטאים עצמם ולא עוד אלא שעי״ז זכותם נוסף וכחם מתחזק וכ״ש יכולים לתקן את אשר עיותו האחרים והיינו כי לא די שיתקנו למה שבבני דורם אלא גם לענין כל מה שנתקלקל העולם מאז נהיו בו חטאים ועד עתה ובודאי שאלה יהיו אח״כ בקיבוץ השלימים ראשי הראשונים והיותר קרובים אליו ית״ש.
The mechanism for this final elevation of the sparks of Holiness is accomplished by the Moshiach dieing and his soul ascending. These sparks ascend through their attachment to the soul of Moshiach.
The Rebbe discussed this concept in many contexts over many years.
One of them was in his Chassidic discourse entitled, "Zeh Yitnu mi'Chatzit HaShekel" in the year 5748, parshat Mishpatim. There he said that the leader of this generation, the last generation of exile and the first of redemption, would descend to death in order to remove death from the world.
But the most significant idea from this teaching was that the Rebbe associated this spiritual concept as a prerequisite for the literal, plain fulfillment of the mitzvah to rebuild the 3rd Temple.
This is in keeping with the principle taught by Rabbi Moshe Cordovero as found in Biurei HaMekubbalim b'Niglah on Tehillim 90:17, which quotes Sefer Gerushin 91 at the end.
There it states that the 3rd Temple is required to be perfect not only in regard to itself, meaning in regard to its physical structure, but also in regard to those who build it. If those who build it are not perfect both spiritually and physically, the 3rd Temple would not be perfect.
The Rebbe says that to resolve the two (seemingly conflicting) views between Rashi and Rambam as to whether the 3rd Temple is built by G-d (meaning the third Temple descends from Heaven built by the hands of G-d) or by Moshiach (meaning that Moshiach will build the third Temple in a material, physical way, according to nature and in keeping with the plain sense of the halachic requirement), Moshiach will hang the doors to the third Temple, which according to halacha is considered completing the action of its construction which was started by G-d.
But as he points out, this still leaves the problem that by Moshiach doing the actual building while not in a state of spiritual and physical perfection, removes the perfect and eternal aspects from the third Temple like when it is built directly by G-d. The Temple is the product of the one who makes it.
The physical body of those who build the 3rd Temple (if they have a body) must be perfect. And as the Rebbe explains at great length in the Chassidic discourse, "L'havin Inyan Techiyat HaMetim" found in Sefer HaMa'amarim Meluket, vol. 3, pg. 321, this condition is only possible when G-d resurrects the human being. Such a resurrected human being then becomes The sprout of My field, the work of My hands for praise. (See Isaiah 60:21), like Adam HaRishon before the sin.
But this idea that Moshiach, after he has attained the halachic status of Presumed to be Moshiach, must be resurrected is really no surprise because as the Rebbe points out from Sukkah 52b quoting Zechariah 2:3 which says:
ויראני ה' ארבעה חרשים מאן נינהו ארבעה חרשים אמר רב חנא בר ביזנא אמר רבי שמעון חסידא משיח בן דוד ומשיח בן יוסף ואליהו וכהן צדק
and Micah 5:4 which says:
והיה זה שלום אשור כי יבא בארצנו וכי ידרוך בארמנותינו והקמנו עליו שבעה רועים ושמנה נסיכי אדם מאן נינהו שבעה רועים דוד באמצע אדם שת ומתושלח מימינו אברהם יעקב ומשה בשמאלו ומאן נינהו שמנה נסיכי אדם ישי ושאול ושמואל עמוס וצפניה צדקיה ומשיח ואליהו:
and Yoma 5a and numerous other sources, we know that at the very least, the 7 Shepherds and 8 annointed individuals are to be resurrected at the beginning of the days of Moshiach because they are needed in order to build the 3rd Temple. Among those named as being amongst the first 15 to be resurrected are Eliyahu the prophet, Moshe Rabbeinu and Moshiach ben David.
And in that context, it is no surprise that the Rebbe said explicitly in the Chassidic discourse, "Gadol Yiyeh Kevod HaBayit" from the year 5722 as found on page 343 in Sefer HaMa'amarim Miluket, volume 4, that, "this is among the reasons that the first activity of Moshiach after he will be 'presumed to be Moshiach' (a halachic status that must be understood according to its plain meaning) is building the Beit HaMikdash. Because this is the root of all the concepts that follow afterward."
And this follows the precise wording and order in the halacha brought by Rambam concerning acquiring the status of Moshiach with certainty according to its plain meaning.
Regarding your question about what difference it makes between being murdered or simply dieing as it relates to the halacha, it is the distinction made by the Rambam.
As explained in the non-censored versions of the Mishnah Torah, this law excludes Jesus from consideration as the Messiah because he refrained from fighting G-d's wars in his place and was also killed. That is to distinguish him from Bar Kochba, who did fight G-d's wars in his place but was unsuccessful ultimately in his wars and was killed in battle.
The concern of some over Rambam's pasak was because tradition taught that there was the possibility that Moshiach ben Yosef would be murdered.
But as we know from the Vilna Gaon, as recorded in Kol HaTor, Chapter 1:6:1, pg.24 in the 1994 Edition, due to all the prayers over the ages, that decree was overturned. And so, that detail of the halacha stands.
In this context it is worth pointing out that the Rebbe wrote in a letter in 5704, as recorded in a kuntress called Torato Shel Moshiach related to this idea, that the view of Rambam as found in Mishnah Torah appears to be that Moshiach ben Yosef and Moshiach ben David are one and the same individual.
And this seems to be one of the messages from the Haftorah to parshat VaYigash found in Yechezkel 37:15-17, which says:
וַיְהִ֥י דְבַר־יְהוָ֖ה אֵלַ֥י לֵאמֹֽר׃
טז וְאַתָּ֣ה בֶן־אָדָ֗ם קַח־לְךָ֙ עֵ֣ץ אֶחָ֔ד וּכְתֹ֤ב עָלָיו֙ לִֽיהוּדָ֔ה וְלִבְנֵ֥י יִשְׂרָאֵ֖ל חברו [חֲבֵרָ֑יו] וּלְקַח֙ עֵ֣ץ אֶחָ֔ד וּכְת֣וֹב עָלָ֗יו לְיוֹסֵף֙ עֵ֣ץ אֶפְרַ֔יִם וְכָל־בֵּ֥ית יִשְׂרָאֵ֖ל חברו [חֲבֵרָֽיו׃]
יז וְקָרַ֨ב אֹתָ֜ם אֶחָ֧ד אֶל־אֶחָ֛ד לְךָ֖ לְעֵ֣ץ אֶחָ֑ד וְהָי֥וּ לַאֲחָדִ֖ים בְּיָדֶֽךָ׃
And even with that aside, it is worth noting that, in fact, there was an attempt to assassinate the Rebbe on the bridge crossing from Manhattan into Prospect Park, Brooklyn by Rashid Baz in 1994, the actual year of the Rebbe’s passing. This corresponds to the nullified decree that Moshiach ben Yosef would be murdered.