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:23:100

That I might do righteousness in that which I left behind." No! It is only a word he is saying; and behind them is a barrier until the Day they are resurrected.  

that I might act righteously, by witnessing that ‘there is no god but God’, that this might be, in that which I have left behind’, ˹in what˺ I have wasted of my life, in other words ˹that this affirmation might be˺ in its place. God, exalted be He, says: By no means!, that is, there shall be no return. It, namely, ˹the statement˺ ‘My Lord! Send me back’, is merely a word that he speaks, but ˹a word˺ in which there is no benefit for him; and behind them, ahead of them, there is a barrier, which prevents them from going back ˹to this world˺, until the day when they are raised, after which ˹day˺ there will be no more return.
القرآن:٢٣:١٠٠

لَعَلِّي أَعْمَلُ صَالِحًا فِيمَا تَرَكْتُ ۚ كَلَّا ۚ إِنَّهَا كَلِمَةٌ هُوَ قَائِلُهَا ۖ وَمِنْ وَرَائِهِمْ بَرْزَخٌ إِلَىٰ يَوْمِ يُبْعَثُونَ  

{لعلي أعمل صالحا} بأن أشهد أن لا إله إلا الله يكون {فيما تركت} ضيعت من عمري أي في مقابلته قال تعال: {كلا} أي لا رجوع {إنها} أي رب ارجعون {كلمة هو قائلها} ولا فائدة له فيها {ومن ورائهم} أمامهم {برزخ} حاجز يصدهم عن الرجوع {إلى يوم يبعثون} ولا رجوع بعده.