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:45

So Allah protected him from the evils they plotted, and the people of Pharaoh were enveloped by the worst of punishment -  

So God shielded him from the evils of what they had plotted, against him, in the way of killing ˹him˺, and there besieged, befell, the folk of Pharaoh, his people as well as him, a dreadful chastisement, drowning,
القرآن:٤٠:٤٥

فَوَقَاهُ اللَّهُ سَيِّئَاتِ مَا مَكَرُوا ۖ وَحَاقَ بِآلِ فِرْعَوْنَ سُوءُ الْعَذَابِ  

{فوقاه الله سيئات ما مكروا} به من القتل {وحاق} نزل {بآل فرعون} قومه معه {سوء العذاب} الغرق.