Is the Fall of Mosul the Fall of ISIS?

Article/Op-Ed in CNN
July 11, 2017

Peter Bergen wrote for CNN about the loss of ISIS territory and fighter numbers, but asserts that the fight against terrorism is not over:

The tidal wave of tens of thousands of "foreign fighters" that once flocked from around the Muslim world and beyond to ISIS' black banners has slowed to a trickle. Estimates cited by The Washington Post suggest that the flow of foreign recruits to ISIS had dropped from a high of 2,000 a month to 50 a month by last fall.
Few foreign militants want to join the losing team.
On Monday, Iraqi Prime Minister Haider al-Abadi declared the defeat of ISIS in Mosul, the second-largest city in Iraq and the place where three years ago the terror group first announced its self-styled caliphate.
The loss of its Iraqi capital as well of much of its territory in Iraq and Syria dramatically undercuts ISIS' claim that it is the caliphate because the caliphate has historically been both a substantial geographic entity such, as the Ottoman Empire, as well as a theological construct.
While the victory over ISIS at Mosul is certainly to be celebrated and its fighters are now more concerned about simple survival than plotting attacks in the West, it's worth recalling that ISIS continues to hold the Iraqi towns of Tal Afar (population 100,000) and Hawija (population 115,000) and its de facto Syrian capital, Raqqa (population around 200,000).