If the French fleet had tried to sail to a German port, the British Home Fleet would have intercepted it before it got there, and sunk most of it. The French battleships, except for the uncompleted Richelieu, were inferior in firepower to their British counterparts, and would have been outnumbered into the bargain.
By the time Italy surrendered in September 1943, the Allies had air superiority over the Mediterranean, so the Germans couldn't have done much with the Italian fleet. The British Air Force would have concentrated on bombing the ships until they were sunk or unseaworthy. There isn't enough searoom in the Mediterranean for the Axis ships to evade being tracked by aircraft from Sicily, Malta and North Africa.