Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:40:85

But never did their faith benefit them once they saw Our punishment. ˹It is˺ the established way of Allah which has preceded among His servants. And the disbelievers thereupon lost ˹all˺.  

But their faith was of no benefit to them when they saw Our doom — ˹This is˺ God’s way (sunnata’Llāhi is in the accusative because it functions as a verbal noun from an implicit verb of the same expression) with the believers, among all communities, which is that faith is of no benefit to them once the chastisement has been sent down, which has its precdent; and it is thence that the disbelievers will be losers — ˹it is thence that˺ their status as losers will become apparent to all ˹of mankind˺, even though they will have always been losers before that. Meccan: it consists of 53 or 54 verses, revealed after ˹sūrat˺ Ghāfir.
القرآن:٤٠:٨٥

فَلَمْ يَكُ يَنْفَعُهُمْ إِيمَانُهُمْ لَمَّا رَأَوْا بَأْسَنَا ۖ سُنَّتَ اللَّهِ الَّتِي قَدْ خَلَتْ فِي عِبَادِهِ ۖ وَخَسِرَ هُنَالِكَ الْكَافِرُونَ  

{فلم يكُ ينفعهم إيمانهم لما رأوْا بأسنا سُنَّتَ الله} نصبه على المصدر بفعل مقدِّر من لفظه {التي قد خلت في عباده} في الأمم أن لا ينفعهم الإيمان وقت نزول العذاب {وخسر هنالك الكافرون} تبين خسرانهم لكل أحد وهم خاسرون في كل وقت قبل ذلك.