"My spirit shall not abide in man forever" (Genesis 6:3). [God says:] I will not place My spirit in them at the time when I grant the reward of the righteous, and so on.
My Spirit Shall Not Abide When the Righteous Are Rewarded
Yalkut Shimoni on Torah 44:2
(בראשית ו ג) לֹא יָדוֹן רוּחִי בָאָדָם לְעֹלָם. אֵינִי נוֹתֵן רוּחִי בָּהֶן בְּשָׁעָה שֶׁאֲנִי נוֹתֵן מַתַּן שְׂכָרָן שֶׁל צַדִּיקִים וְכוּ'.