Attrition and the Gender Patenting Gap