If you get a French SIM card then you’ll have a French number. The only way I know of to keep your number is not to get a SIM card but to get an international plan, and as I understand those are very expensive. When I did the Camino in 2014 I had to use an old unlocked phone and just got a SIM card from Orange when I got to Le Puy, then got a Spanish SIM card when I entered Spain. With the new phones you may be able to get an eSIM, and you’d be able to switch between them on your phone but I am not traveling internationally anytime soon so I haven’t done any research as to how that works more specifically. You would still have International roaming on your current number, though, so it still wouldn’t be feasible to use it while in another country.