"Eleven days from Horeb by way of Mount Seir" (Deuteronomy 1:2). Moses said to them: See what you caused to yourselves, for you still have not entered the land — until now, forty years. Therefore it is stated afterward, "And it came to pass in the fortieth year" (Deuteronomy 1:3). And what did Moses our teacher, peace be upon him, see, that he did not reprove them except near his death? Rather, it is because a person must guard himself not to reprove his fellow except either near his death, or close to parting from him, so that there be no enmity at all in the heart of his fellow against him. For so we find with Jacob, who did not reprove Reuben, Simeon, and Levi except near his death; and likewise Moses our teacher, peace be upon him, did not reprove them except near his death.
Why Moses Waited Until His Death to Rebuke Israel
Midrash Aggadah, Deuteronomy 1:2
אחד עשר יום מחורב דרך הר שעיר. אמר להם משה ראו מה אתם גרמתם לעצמכם, שאתם עדיין לא נכנסתם לארץ עד עכשיו ארבעים שנה, ולכך נאמר אחריו ויהי בארבעים שנה. ומה ראה משה רבינו ע"ה שלא הוכיחן אלא סמוך למיתתו, אלא לפי שאדם צריך לשמור עצמו שלא להוכיח את חבירו אלא או סמוך למיתתו, או קרוב ליפרש ממנו, כדי שלא יהיה בלבו של חבירו שום איבה עליו, כי כן מצינו ביעקב שלא הוכיח לראובן ושמעון ולוי אלא סמך למיתתו, וכן משה רבינו ע"ה לא הוכיחן אלא סמך למיתתו: