Praise be to Allah.
It is not permissible for you to leave your son to be easy prey for the disbelievers. You have to do your utmost to take him away from his mother and her country, so that he can live with you in your country. This is your right according to sharee‘ah, and he should follow you in your religion and be in your custody; that apostate woman has no right to him. If you can give them money to let the boy be with you, then do so; if you can refer the matter to their courts so that he can be in your custody, then do so. In all of these matters, you should consult Islamic centres whose staff you trust in that country, and consult trustworthy lawyers. If you can find a suitable way to take him and bring him to your country, then do so.
If your attempts to keep your son with you now do not succeed, but the law will allow you to have custody of him within a short period of time, then there is nothing wrong with staying there for the duration, so that you can be near him and in constant contact with him, until you are able to have custody of him. At the very least, you can frequently visit that country in order to see him and take care of him as much as you can, within time constraints. Perhaps your frequent visits will be a cause of his mother coming back to Islam and being saved from eternity in the Fire, and it may be a cause of your son bonding with you and loving Islam. At the same time you should do whatever you can to make sure that he is in a clean environment, whether in the place where he is living or in school. We know how difficult that is, but whoever fears Allah, may He be exalted, is sincere in his intention and does his utmost, there is the hope that the difficulties will be reduced for him and his good wishes will be fulfilled.
If your staying in France will increase the likelihood of your son being with you and keeping his religion, and that his apostate mother will not make him into a Christian or turn him away from your religion, then stay close to him until you are able to take custody of him, as mentioned above. If you think that there is no benefit in your staying there, and that you will never be able to take custody of him within a short period of time, then what we think is that you should move to your country Morocco, and start a new life there, but that is on condition that you can frequently visit the place where your son lives, as we mentioned above. Do not cut off your ties with him and keep in touch with him as much as you can.
And Allah knows best.