You cannot stop the migration of people from place to place. If a bunch of Muslims move to a different place, they’re allowed to keep their religion inasmuch as a Christian should be allowed to keep their religion moving to a non Christian country.
Where France has done a poor job is enforcing separation of church and state, I.e. Muslim women have the same rights as men, for instance.