France edged Brazil 2-1 in an entertaining international friendly in Foxborough, with Kylian Mbappe opening the scoring with a composed lob before Hugo Ekitike doubled the lead in the second half.