That's how it works. A law is debated, voted on and if accepted then enacted. Another way to call it is "progress". It works the same for... well mostly everything that becomes law.
But since you're not French, you can easily wait 20 years and then decide if it was a good thing or not. For now, France has debated the subject and taken a decision, and I don't think it needs advice on whether the political process should have been different or not.
---
And how would you propose measuring whether or not this experiment will be a success, lacking any control to measure it against? If it turns out French students are performing worse 20 years from now there will certainly have been countless other 'experiments' carried out since then, meaning any causality is going to be extremely difficult to trace. And similarly if they are performing better. By contrast when things are enacted locally we can often get samples of groups where things are very similar except for [x], which can help determine causality.
Instead it all turns into, as usual, retrospective confirmation bias. People take what they want to be true, and attribute positive results to that while taking what they don't want to be true and attribute negative results to that. It's hardly a logical way of trying to achieve genuine "progress."
As said elsewhere in that discussion, most school (all of them?) are already banning smartphone, so it has already been tested before.
Citizens are equal everywhere, therefore it makes little sense not to enact public health measures nationally.
It seems even more questionable, to me, to enable a measure for 20 years in one region using their children as guinea pigs, but that would most likely be unconstitutional anyway.