Same way Malaysia is an Islamic state even though 40 percent of the population is not Muslim.
However you don't have the mental capacity for understanding, so don't try. You already showed us how stupid you are by failing to grasp that Egypt and Israel remained at war for thirty years until they signed a peace deal. That concept was also too much for your limited intelligence.
No, you've got it wrong again. Malaysia is not an Islamic state but Islam is the state religion. Israel, on the other hand, specifically declares itself a Jewish state. Further, Malaysia does not hand out automatic citizenship to any Muslim. Malaysia has not declared itself the homeland of the Muslim people. Malaysia has not seized the property and land of hundreds of thousands of people of other faiths and given them to Muslims. Malaysia does not have millions of ethnically cleansed refugees of other faiths who wish to return to their homes in Malaysia.
So, try again. Get a better comparison.