"whom the L-rd knew face to face": Because it is written (Shemoth 33:18) "And he said: Show me, I pray, Your glory," He said to him: In this world you cannot see it, it being compared to a "face," viz. (Ibid. 20) "You shall not be permitted to see My face." But you will see it in the world to come, where it is compared to a "back," viz. (Ibid. 23) "Then I shall remove My palm, and you shall see My back." When did He show it to him? Close to his death — whence we derive that close to death it can be seen.
What It Means That God Knew Moses Face to Face
Sifrei Devarim 357:41