We must not use the verses from the Quran regarding the Prophet Yusuf (‘Alayhis-Salam) as an excuse or justification to support and legitimize (in its various forms) the system of Taghut.
First of all, Allah assures us in the Quran that He sent every prophet with the following mission/objective:
وَلَقَدْ بَعَثْنَا فِي كُلِّ أُمَّةٍ رَّسُولًا أَنِ اعْبُدُوا اللَّهَ وَاجْتَنِبُوا الطَّاغُوتَ
And We certainly sent into every nation a messenger, [saying], “Worship Allah and avoid Taghut.” (16:36)
Yusuf (alayhis-salam) was guided by Allah himself to do what Allah wanted him to do. A believer cannot make the assumption that any prophet will go against the commands of Allah, nor that Allah will command His prophets to do something that violates the command that was given to every prophet (to worship Allah and avoid taghut). Anyone who makes such assumptions has entered in to kufr.
Allah does not contradict Himself!!
أَفَلَا يَتَدَبَّرُونَ الْقُرْآنَ ۚ وَلَوْ كَانَ مِنْ عِندِ غَيْرِ اللَّهِ لَوَجَدُوا فِيهِ اخْتِلَافًا كَثِيرًا
Do they not then consider the Quran carefully? Had it been from other than Allah, they would surely have found therein much contradictions. (4:82)
What is also important to understand is that Allah does not always give the same shari’a (law) and methodology (minhaj) to all the prophets. In other words, the shari’a and minhaj of the Prophet Muhammad (salla Allahu alayhi wa sallam) is different from the Shari’a of Yusuf (alayhis-salam). Allah says:
لِكُلٍّ جَعَلْنَا مِنكُمْ شِرْعَةً وَمِنْهَاجًا
To each of you We prescribed a law and a method. (5:48)
We follow the Shari’a and minhaj of Muhammad (salla Allahu alayhi wa sallam)!
However, in our everyday life, we must seek advice and guidance from the people of knowledge as to what really consists cooperating or supporting Taghut. We must NOT use our own interpretations if we are not scholars or students of knowledge, and I know most of us here are NOT.
فَاسْأَلُوا أَهْلَ الذِّكْرِ إِن كُنتُمْ لَا تَعْلَمُونَ
So ask the people of the message (scholars) if you do not know. (16:43)
And Allah knows best…