Decades of initiatives have striven to fix the so-called “leaking pipeline” problem—persistent high attrition of women from the career/educational path toward STEM professorship. Though these initiatives call on academics to increase female retention along this path, it remains unknown whether academics actually prioritize this goal. To investigate this, we tested whether academics would prioritize female retention at the cost of a competing goal when giving career advice to students at risk of leaving the “pipeline.” We present results from a national survey in which United States professors (n = 364) responded to vignettes of three hypothetical undergraduates, rating the extent to which they would encourage or discourage each student from pursuing a PhD in physics. Professors were randomly assigned vignettes with either male or female gender pronouns. Two vignettes featured students who cogently explained why remaining in the physics pipeline would not match their individual goals and interests, while another vignette presented a student with goals and interests that clearly matched pursuing physics graduate school. Professors who received female-gendered vignettes were thus forced to choose between prioritizing striving to increase female retention in physics and acting in the best interest of the individual student. We present evidence that professors seem prepared to encourage women more strongly than men to remain in physics, even when remaining is contrary to the stated goals and interests of the student: Our logistic regression results suggest that professors have higher odds of encouraging women over men, net of vignette and other controls. We also find that male professors have higher odds of encouraging undergraduates and find no evidence that, relative to non-STEM professors, STEM professors have higher odds of encouraging women over men.