Self-efficacy can affect performance, career goals, and persistence. Prior studies show that female students have lower self-efficacy than male students in various science, technology, engineering, and mathematics (STEM) domains, and the self-efficacy gap is a factor that contributes to the low representation of female students in STEM. However, prior research has not decoupled self-efficacy differences from performance differences. This study examines the self-efficacy of male and female students with similar performance in introductory physics courses and investigates whether gender gaps in self-efficacy are persistent across different instructors and course formats. Students filled out a self-efficacy in physics survey before physics 1, before physics 2, and at the end of physics 2. Students' achievement was measured by their performance on research-based conceptual physics tests and course grades. The physics courses were taught by several instructors and varied in the type of pedagogy used, with some using a "flipped" format and others using a traditional, lecture-based format. We found that female students had lower self-efficacy than male students at all performance levels in both physics 1 and physics 2. The selfefficacy gaps continued to grow throughout the introductory physics course sequence, regardless of course format (i.e., traditional or flipped) and instructor. The findings suggest that female students' self-efficacy was negatively impacted by their experiences in introductory physics courses, and this result is persistent across various instructors and course formats. Female students' lower self-efficacy compared to similarly performing male students can result in detrimental short-term and long-term impacts.