Dalil

Quran Sad 38:32

فَقَالَ إِنِّيٓ أَحۡبَبۡتُ حُبَّ ٱلۡخَيۡرِ عَن ذِكۡرِ رَبِّي حَتَّىٰ تَوَارَتۡ بِٱلۡحِجَابِ

Translation

And he said, "Indeed, I gave preference to the love of good [things] over the remembrance of my Lord until it [i.e., the sun] disappeared into the curtain [of darkness]."