Republican and ISIS have a common enemy: moderate Muslims.
There are over millions of moderate non-violent Muslims in the world. They don't take the Koran any more seriously than the millions of Christians who celebrate Christmas but don't subscribe to a literal reading of the Bible.
The existence of moderate Muslims is why you can have nations like Turkey and Jordan, which are friendly with the west.
The way to defeat terrorism is to partner with and empower non-violent Muslims to expunge the radicals.
But the Republicans and ISIS don't want to empower moderates because they each need fear to seize and maintain power. Republicans use fear of Muslims to get elected and increase military budgets. ISIS uses fear over the west to radicalize moderate Muslims.
ISIS and the Republicans benefit from terrorism and the fear it causes. Without it, their claim to power goes down.