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:10:83

But no one believed Moses, except ˹some˺ youths among his people, for fear of Pharaoh and his establishment that they would persecute them. And indeed, Pharaoh was haughty within the land, and indeed, he was of the transgressors  

But with Moses, none believed save a few descendants, a party, of, the children of, his, that is, Pharaoh’s, folk, out of fear of Pharaoh and their council, that he ˹Pharaoh˺ might persecute them, turn them away from his ˹Moses’s˺ religion by torturing them; and truly Pharaoh was despotic, arrogant, in the land, the land of Egypt, and truly he was of the prodigal, ˹of˺ those who transgress the bounds by claiming to be Lords.
القرآن:١٠:٨٣

فَمَا آمَنَ لِمُوسَىٰ إِلَّا ذُرِّيَّةٌ مِنْ قَوْمِهِ عَلَىٰ خَوْفٍ مِنْ فِرْعَوْنَ وَمَلَئِهِمْ أَنْ يَفْتِنَهُمْ ۚ وَإِنَّ فِرْعَوْنَ لَعَالٍ فِي الْأَرْضِ وَإِنَّهُ لَمِنَ الْمُسْرِفِينَ  

{فما آمن لموسى إلا ذرية} طائفة {من} أولاد {قومه} أي فرعون {على خوف من فرعون وملئهم أن يفتنهم} يصرفهم عن دينه بتعذيبه {وإن فرعون لعال} متكبر {في الأرض} أرض مصر {وإنه لمن المسرفين} المتجاوزين الحد بادعاء الربوبية.