Clouds of Glory Restored
בפסוק וישמע הכנעני כו' שמע שמת אהרן כו' אל תקרי ויראו אלא וייראו כו' כי אהרן תיקן את אשר כתי' פרעה אהרן לשמצה בקמיהם לכן חזר וכיסה אותם בענני כבוד
On the pasuk "And the Canaanite heard..." — he heard that Aharon had died, and Chazal teach: do not read "and they saw" (vayiru) but rather "and they were afraid" (vayiru) — for Aharon had rectified that which is written, "Pharaoh" — meaning Aharon — "made them a byword of derision (lishmatzah) among those who rose against them"; therefore he went back and covered them over again with the Clouds of Glory.
When the Canaanite — really Amalek in disguise — heard that Aharon had died, the protective Clouds of Glory that had come in Aharon's merit departed, leaving Bnei Yisrael exposed; Aharon had earned those Clouds by rectifying the blemish of the Eigel, so once he was gone the covering left with him.
ופי' זה כי ודאי פנימיות בני ישראל לעולם במקומי עומד
And the explanation of this is that surely the inner essence (penimiyus) of Bnei Yisrael forever stands in its place, unchanged before Hashem.
The Sfas Emes establishes that the deepest core of every Yid never changes and always remains pure and intact before Hashem, no matter what happens on the surface.
אבל ע"י החטא נפגם בחי' החיצוניות שלהם והיו צריכין מכסה
But through the sin, the dimension (bechinah) of their externality (chitzoniyus) was blemished, and they therefore required a covering.
Sin does not touch that inner core, but it does damage the outer, revealed dimension of a Yid, and it is that damaged exterior that needs a protective covering.
ואיתא הוא עמלק ולבש עצמו לבושי כנעני דכ' ולאום מלאום יאמץ
And it is brought down that this was Amalek, who garbed himself in the garments of the Canaanite, as it is written, "and one people shall be mightier than the other people" (Bereishis 25:23).
The hostile force behind the Canaanite was actually Amalek cloaking himself, reflecting the rule that when one nation rises the other falls — Yaakov and Eisav cannot both be strong at once.
ולכן ע"י שנחסר מבנ"י אותו המלבוש ופריסות ענני הכבוד להסתר בהם מע"ר של האומות וסט"א
And therefore, since Bnei Yisrael were now lacking that garment and the spreading of the Clouds of Glory in which to be concealed from the evil eye of the nations and from the sitra achra (the side of impurity),
Because Bnei Yisrael lost the garment of the Clouds of Glory that had shielded their vulnerable exterior from the evil eye of the nations and from the forces of impurity, they stood unguarded.
כן לעומת זה הרויחו הרשעים התלבשות להסתיר עצמם בכח טומאה שלהם עד שביקשו להסתר מפני בנ"י
correspondingly, by way of opposite measure, the resha'im (the wicked) gained a garbing in which to conceal themselves through the power of their impurity, until they sought to hide themselves from before Bnei Yisrael.
By the spiritual law that every gain on the side of kedushah has a mirror on the side of tumah, when Bnei Yisrael lost their covering the resha'im correspondingly gained a concealing garment of their own, growing so emboldened that they even hid themselves to ambush Bnei Yisrael.
אך מרע"ה בתפלתו החזיר לבנ"י העננים כמ"ש בזוהר
But Moshe Rabbeinu, through his tefillah, restored the Clouds to Bnei Yisrael, as is stated in the Zohar.
Moshe Rabbeinu's tefillah brought the Clouds of Glory back to Bnei Yisrael, as the Zohar relates, reversing the loss caused by Aharon's passing.
וכמו כן בש"ק שיש בו פריסת סוכת שלום הנ"ל
And likewise on Shabbos Kodesh, on which there is the spreading of the aforementioned sukkah of shalom (the canopy of peace),
The same protective covering returns every Shabbos, when Hashem spreads over Bnei Yisrael that same sukkah of shalom — the canopy of peace and protection.
נשארה הסט"א בלי לבוש
the sitra achra is left without a garment,
Once that holy covering of Shabbos is restored to Bnei Yisrael, the inverse follows for the sitra achra: it is stripped bare of any garment in which to conceal itself.
ולכך כולהו ערקין ומתעברין מינה כו':
and therefore they all flee and pass away from before it.
Exposed and powerless, the forces of impurity flee and are nullified, unable to remain before the kedushah of Shabbos and passing away from it.
Summary: In this piece the Sfas Emes explains why the Canaanite — in truth Amalek in disguise — attacked precisely when Aharon died and the Clouds of Glory departed. He teaches that the penimiyus, the inner essence of every Yid, never changes and forever stands pure before Hashem; sin blemishes only the outer, revealed dimension, which then requires a protective covering, and that covering was the Clouds of Glory that Aharon had merited. There is a measure-for-measure balance between kedushah and the sitra achra: when Bnei Yisrael lost their concealing garment, the resha'im gained a garment of tumah and grew bold enough to hide and attack, until Moshe Rabbeinu's tefillah restored the Clouds. The Sfas Emes then applies this to Shabbos Kodesh, when Hashem spreads the sukkah of shalom over Bnei Yisrael — for then the sitra achra is left exposed without any garment, and all the forces of impurity flee and pass away from before the holiness of Shabbos.