Sure At-Tawba

9:115

وَمَا كَانَ ٱللَّهُ لِيُضِلَّ قَوْمًۢا بَعْدَ إِذْ هَدَىٰهُمْ حَتَّىٰ يُبَيِّنَ لَهُم مَّا يَتَّقُونَ ۚ إِنَّ ٱللَّهَ بِكُلِّ شَىْءٍ عَلِيمٌ

Nimmer wird Allah Leute in die Irre gehen lassen, nachdem Er sie rechtgeleitet hat, bis Er ihnen darüber Klarheit gegeben hat, wovor sie sich hüten sollen. Gewiß, Allah weiß über alles Bescheid.

Tafsir 9:115

Allah would never pass the judgement of misguidance against a people, after He had given them guidance, until He makes clear to them those forbidden things that they must avoid. If they do that which Allah had forbidden after it has been declared forbidden and made clear to them, then He will judge them as misguided. Allah knows everything. Nothing is hidden from Him. He has taught you what you did not know.