Sure Saba

34:14

فَلَمَّا قَضَيْنَا عَلَيْهِ ٱلْمَوْتَ مَا دَلَّهُمْ عَلَىٰ مَوْتِهِۦٓ إِلَّا دَآبَّةُ ٱلْأَرْضِ تَأْكُلُ مِنسَأَتَهُۥ ۖ فَلَمَّا خَرَّ تَبَيَّنَتِ ٱلْجِنُّ أَن لَّوْ كَانُوا۟ يَعْلَمُونَ ٱلْغَيْبَ مَا لَبِثُوا۟ فِى ٱلْعَذَابِ ٱلْمُهِينِ

Und als Wir für ihn den Tod bestimmt hatten, wies sie auf sein Ableben nur das Tier der Erde hin, das seinen Stab fraß. Als er dann niederstürzte, wurde den Ginn klar, daß sie, wenn sie das Verborgene gewußt, nicht (weiter) in der schmachvollen Strafe verweilt hätten.

Tafsir 34:14

When we decreed for Solomon to die, the Jinn did not realise he had passed away until the woodworms had eroded away the staff he was leaning on. When he fell it became clear to the Jinn that they do not know the unseen/ghayb, as if they did, they would have not remained subdued, continuing to carry out the difficult tasks imposed upon them.