The statement appears to accurately mirror the research paper.
To me it looks about as well done as such a study could be done with the data available. Though beware of popsci news articles which ignore the authors caveats.
Results 104 630 patients were treated by 3314 surgeons, 774 female and 2540 male. Before matching, patients treated by female doctors were more likely to be female and younger but had similar comorbidity, income, rurality, and year of surgery. After matching, the groups were comparable. Fewer patients treated by female surgeons died, were readmitted to hospital, or had complications within 30 days (5810 of 52 315, 11.1%, 95% confidence interval 10.9% to 11.4%) than those treated by male surgeons (6046 of 52 315, 11.6%, 11.3% to 11.8%; adjusted odds ratio 0.96, 0.92 to 0.99, P=0.02). Patients treated by female surgeons were less likely to die within 30 days (adjusted odds ratio 0.88; 0.79 to 0.99, P=0.04), but there was no significant difference in readmissions or complications. Stratified analyses by patient, physician, and hospital characteristics did not significant modify the effect of surgeon sex on outcome. A retrospective analysis showed no difference in outcomes by surgeon sex in patients who had emergency surgery, where patients do not usually choose their surgeon.
The phrasing in the article is a tad ambiguous as to the 12%. To be clear it's difference in relative risk, not difference in absolute risk.
(I have a mild premonition that I'll soon be seeing facebook posts about this with people misunderstanding the statement and hence convinced that male doctors have a 1/8 chance of killing you)
Comparing 52315 patients treated by men and 52315 matched patients treated by women 480 of the womens patients died within 30 days and 543 of the mens patients died within 30 days. Adjusted odds ratio (95%CI; P value) 0.88 (0.78 to 0.99; 0.04).
Significance threshold used was 0.05
0.0012% difference in absolute risk.
In subgroup analysis the difference was large in patients undergoing elective surgery (see the plastic surgery subgroup in the chart below) but there was no difference in outcomes by surgeon sex in patients who had emergency surgery.
In this population based cohort, we found small but significant differences in postoperative complications (mortality, complications, and readmission) between patients treated by male and female surgeons, using an α criterion of 0.05. Patients treated by female surgeons had lower rates of 30 day mortality. We matched patients for age, sex, and general comorbidity that had the same surgical procedure by a female or male surgeon of the same age with comparable annual surgical volume in the same hospital. Male surgeons in this cohort had higher average procedural volumes, which mitigates some of the effect of surgeon sex. Outcomes adjusted for case-mix (without adjustment for surgical volume) were comparable for patients treated by female and male surgeons. Retrospective analyses showed that the effect of surgeon sex was restricted to patients who had elective operations; outcomes did not differ among patients who had emergent operations. This finding must be interpreted within the limitations of retrospective analyses.

I see nothing obviously wrong with the research paper, the authors themselves are clear about the limits of their analysis and the possibility that some findings could be due to unknown confounding variable.
Strengths and limitations of this study
We were able to comprehensively capture patients undergoing the selected surgical procedures because of single payer healthcare in Ontario. Unlike Tsugawa et al, who were limited to Medicare beneficiaries aged 65 years and older, we identified all adult patients who had the procedures of interest. This is particularly important because patients treated by female physicians were younger than those treated by male surgeons. Moreover, the nature of the healthcare system enabled us to capture readmissions and complications occurring anywhere in the province, including at hospitals other than where the index surgery was performed.
The observational nature of our study carries some limitations. Primarily, we are unable to account for unmeasured (and unmeasurable) residual confounding. Differences in socioeconomics and comorbidity, which were not measured by our data sources, might have contributed to our findings. We used hard matching to directly compare outcomes between patients treated by female and male surgeons, but within group heterogeneity from the categorical definitions of surgical volume and comorbidity might have caused residual confounding. Finally, we did not have information on the severity of the diseases for which surgery was performed (for example, cancer stage) or case complexity, though procedures were matched directly.
TL:DR: yes the claim appears to match the research paper but the difference is far smaller than it makes it sound.