Sin Cannot Sever Bnei Yisrael
בפסוק לא הביט און ביעקב כו' ה' אלקיו עמו
Regarding the pasuk, "He has not beheld iniquity in Yaakov... Hashem his God is with him" (Bamidbar 23:21).
The Sfas Emes opens with Bilam's blessing that Hashem sees no iniquity in Yaakov, because Hashem their God remains with them.
פי' כי אין החטא עושה רושם בישראל לסלק מאתם אלקותו ית"ש כי החטא שלהם במקרה ולא בעצם כי מאמר אנכי ה' אלהיך קיים לעד ההוא אמר כו' ולא יקימנה וזה הטעם שאינו מתבונן בעונות שלהם שהם רק במקרה גם ותרועת מלך בו שמעניש אותם מיד בעוה"ז ואין מניח למלאות הסאה עד שיסתלק ח"ו אלקותו מהם כמ"ש בזוה"ק בפסוק ואותך לא אעשה כלה ע"ש:
The explanation is that the sin makes no lasting impression upon Bnei Yisrael to remove from them the Godliness of Hashem, may His Name be blessed, for their sin is something incidental and not of their essence, since the declaration of "Anochi Hashem Elokecha — I am Hashem your God" (Shemos 20:2) endures forever, for "He spoke and it shall stand" (Tehillim 33:9), and He will never let it be undone; and this is the reason that He does not gaze upon their iniquities, for they are only incidental. Likewise, "and the friendship of the King is in him" (Bamidbar 23:21) — that He punishes them immediately in this world and does not allow the measure to be filled, lest, chas v'shalom, His Godliness depart from them, as is written in the Zohar HaKadosh on the pasuk "but of you I will not make a full end" (Yirmeyahu 30:11); see there.
He explains that sin never touches the essence of Bnei Yisrael, since their bond with Hashem from "Anochi Hashem Elokecha" is eternal and unbreakable; therefore Hashem does not dwell on their sins, which are merely incidental, and He even punishes them at once in this world precisely so that their sins should not accumulate to the point where, chas v'shalom, His Godliness would be removed from them.
Summary: The Sfas Emes draws from Bilam's words, "He has not beheld iniquity in Yaakov... Hashem his God is with him," that the sins of Bnei Yisrael leave no lasting mark and cannot sever the Godliness of Hashem that rests upon them. Because their connection to Hashem, established at Har Sinai through "Anochi Hashem Elokecha," stands forever and can never be undone, their transgressions are only incidental and never touch their true essence. For this reason Hashem does not fix His gaze upon their iniquities. The continuation, "and the friendship of the King is in him," teaches further that Hashem in His love punishes them immediately in this world, never permitting the measure of sin to fill up, so that, chas v'shalom, His Godliness should never depart from them, as the Zohar HaKadosh expounds on "but of you I will not make a full end."