If ISIS wins the Algerian civil war (event 8000318, algeria.txt), there is no event to make it a theocracy. This results in strange consequences, especially if Algeria's government form has changed along the way.
It is able to join numerous international communities, including the UN, and holds elections for the caliph.
As a more general problem, if ISIS exists at the beginning of the Syrian civil war (event 8014730, syria.txt), and Syria wins, the annex war goal leads to things like this happening:
I doubt even the pan-Arab republic would be happy with this one.
It should be a simple fix, just changing the war goal for Syria. It can either be acquire all cores, which will leave ISIS with whatever land they had, or something along the lines of a dismantle, as it makes sense that a surrender from ISIS would involve leaving all occupied land.
On that note, it is currently impossible for a great power to intervene against ISIS due to it being a Civil War war goal. If we want to keep it that way, we could add "call_ally" disabled in the war. Although, I'm not sure it makes sense to prevent a GP from intervening, given all the intervening they're currently doing.
It could also be considered to simply give the GPs CBs against ISIS so they'll declare their own wars. This makes sense, as our modern great powers aren't exactly cooperating in Syria.