Aslam

Surah Yusuf — 12:35
ثُمَّ بَدَا لَهُم مِّنۢ بَعۡدِ مَا رَأَوُاْ ٱلۡأٓيَٰتِ لَيَسۡجُنُنَّهُۥ حَتَّىٰ حِينٖ
And so it occurred to those in charge, despite seeing all the proofs ˹of his innocence˺, that he should be imprisoned for a while. 

Commentary

Then the view of the minister and his people, after they had seen evidence of his innocence, was that they should put him in prison for an unknown period, so that the scandal was not exposed.

Read Tafsir Ibn Kathir