I believe Britain already has laws stripping those involved in terrorism of their citizenship, even if it makes them stateless. It is a fairer law than Canada who will only strip dual citizens of Canadian citizenship, effectively creating a 2-class Canadian citizenship.

Anyway, if they have gone abroad to pledge allegiance to a foreign state, they are not stateless. The problem is to separate those who truly regret going (and could be useful in counter-radicalization efforts), and those who return to bring war home. Maybe those who leave and return have to explicitly swear allegiance to the home country, increasing the penalty (including loss of citizenship) for terrorist acts.