The current recommendation for a patient who has conceived on metformin, is to discontinue the medication once pregnancy is confirmed.
Indeed, there is some data about use of metformin and decreased percent of miscarriages and birth defects in women with PCOS, but, these result come from small studies and they warrant additional experiments to be confirmed.
As any other medication, it is better not to be used during pregnancy.
For correct answer, consult your fertility clinic!
Best wishes!
Marija