Islamic State’s military retreat raises risk of attacks in France: prosecutor