Defence treaty but with what weapons? All weapons come from the West.
I feel people are clueless about how things work. For any kind of defence treaty, which I am assuming correctly would be against Western interests, you need a MASSIVE Soviet Union scale weapons industry totally indigenous and divorced from any Western involvement. From guns, to tanks, to high tech planes. To do this you need to have a massive leap upwards in education, R&D, engineering skills and so on. There is NO Muslim country who can manufacture any such equipment that is even remotely capable of matching Western weapons.
Weapons are not simply hey I bought a plane from the US that's it. You need to maintain them, constantly replace parts, educate your teams of engineers so they know how the tech works, ALL of which is impossible without Western help. You can ofcourse arm yourself with Russian or Chinese inventory. But anything they have right now is not comparable to say the F35 or F22 as their equipment is all untested.
I get what you're saying but such treaties mean all the nations have to be closely integrated with weapon systems, training, funding etc like NATO. It'll never ever happen, even if not due to lack of will but because of the above.