Sure Al-Israa

17:67

وَإِذَا مَسَّكُمُ ٱلضُّرُّ فِى ٱلْبَحْرِ ضَلَّ مَن تَدْعُونَ إِلَّآ إِيَّاهُ ۖ فَلَمَّا نَجَّىٰكُمْ إِلَى ٱلْبَرِّ أَعْرَضْتُمْ ۚ وَكَانَ ٱلْإِنسَٰنُ كَفُورًا

Und wenn euch auf dem Meer ein Unheil widerfährt, entschwinden (euch) diejenigen, die ihr außer Ihm anruft. Aber nachdem Er euch ans (Fest)land errettet hat, wendet ihr euch (von Ihm) ab; der Mensch ist eben sehr undankbar.

Tafsir 17:67

And when you are afflicted - O idolaters - by some calamity or misfortune at sea such that you fear destruction, those whom you worship besides Allah leave your thoughts, and you only remember Allah and seek His assistance. Then when He assists you and saves you from your fears, and you return to land, you turn away from His Oneness and supplicating Him alone, returning to your idols. And man rejects the blessings of Allah.