To add another data point: I submitted a paper to a major mathematics journal which had a mistake in a proof. One of the referees flagged that I was making a claim without proving it, and asked for me to revise it. I submitted a revised version which still had a mistake in the same step and it was accepted.
(Three years later, my doctoral supervisor pointed out the mistake to me, and we published another paper -- in the same journal -- filling the gap.)
(Three years later, my doctoral supervisor pointed out the mistake to me, and we published another paper -- in the same journal -- filling the gap.)