I have a slightly different take from other people on this. I don't think it is true protagonists should never be perfect; it might depend on what we mean by "perfect" but I think interesting and compelling stories can be written with characters that don't have deep flaws (or not flaws the author or reader sees as such or cares about). I think giving flaws to a character just for the sake of them having flaws is misguided. We talk about "humanizing" characters but that doesn't have to take only one shape. You can engage with a character's internality, show them having relatable doubts and fears and struggles and joys and internal contradictions without giving them a trait you feel is a "flaw" (for example here is someone arguing that good stories can be written about a character that is as perfect as they get). You can also have a character who you don't explore particularly well, but you know they "should have a flaw" so you make them clumsy in a way that has little impact on the story, or conversely have them run over someone in their car and not actually explore how awful this event is, but yay your character is flawed it's fine. I think we should not ignore the potential issues with a character being flawed in a way that is unacceptable to the reader, I have absolutely rejected stories because the protagonist was flawed in ways that did not make me want to read about them. Or more precisely I should say: their flaws were written in ways that did not make me want to read about them.
I think the important thing to consider is, why is a flaw a flaw? What makes a perfect protagonist perfect? The answer I think is the moral convictions of the author and reader. An author with well-thought out and consistent moral convictions will present a perfect protagonist in ways that highlight and defend these convictions. They will present a flawed or even villainous protagonist in ways that also highlight those convictions, by presenting a coherent view of why those flaws are bad, how they impact the protagonist and those around them, and so on. This will in turn make a story that is coherent and well-constructed in terms of themes, plot consequences, emotional resonance, what have you, and readers will respond to that.
I think the danger with writing "perfect protagonists" or the kind of flawed protagonist that makes you nope out of the book, is when the author does not have a coherent moral philosophy or has one that is so abhorrent to the reader that they cannot stand reading it. A reader can forgive a flawed protagonist; it is much harder to forgive a protagonist who acts terribly (or in ways the reader thinks are terrible) but who the author clearly thinks is perfect, where the consequences of the terrible actions are not explored in their terribleness and who faces no negative repercussions for their behavior. It is similarly hard to forgive a protagonist who is presented as flawed, but where the author seems to have little concept of how flawed they've really made their protagonist, or treats as flaws things the reader thinks are fine while treating as fine things the reader thinks are awful.
The issue IMO isn't just that we want to be morally validated by what we read, but that insofar as a plot has moral elements (and any story that worries about its protagonist being perfect or flawed has a moral element to it), like every other aspect of the work they need to have a realism or at least internal coherence to them to avoid pushing the reader out of the story. I see it as a form of suspension of disbelief. In a fantasy or science-fiction work you can accept some foundational premises and then enjoy the story insofar as everything derives from those premises, but you start getting in trouble when more and more inconsistent elements are thrown at you such that you spend more time making the effort to suspend your disbelief than enjoying the story, or find the story drained of tension because you cannot anticipate what will happen next given all the inconsistencies. Similarly you can temporarily adopt an alternate moral framework (within limits) to enjoy a story, but if it is badly thought-out then one has to constantly update the "moral suspension of disbelief" as actions get presented as good or bad with little in-universe consistency, and it becomes hard to root for an outcome if you aren't given a stable value system to judge outcomes by.
Here is an example of what I mean with how someone can enjoy a work of art they morally disagree with, because they think it presents its own moral universe well (and how it contrasts with one that doesn't) :
In your story, what do YOU think about the mistake you propose your character make? It doesn't strike me as a shocking mistake in the universe of mistakes action protagonists make, but I find it very interesting that you are worried about it. Do YOU think this is an egregious mistake? Why? Do you imagine the feelings of the friends and loved ones of the victims, and what they would think of your protagonist? Do you have a mental view of your protagonist as someone righteous, wise and reliable and you feel this action might be too far out of character for them? Do you feel you, as a moral arbiter, would not be able to respect this character as much as you want your reader to respect her? Conversely, do you actually think it's fine but are worried a reader would disagree? If so, why do you think it's fine, how would you argue your case to this hypothetical reader? I think this is all valuable to explore! And it should inform your writing. As you explore it hopefully your own views may become more coherent and something you feel confident in, and once that happens it matters less what your readers think - you can try to sell them on what you think. Maybe you'll decide that no, this is not a mistake you feel is forgivable for your character... If so I think it would be a bit cheap to have it just not happen, or happen to someone else. Because if it just happens to someone else for your own convenience, that means your character is just lucky to be "good". That's not very morally compelling! If this mistake is so awful that your protagonist must not make it, but someone easily could, what does it make the poor sap of a secondary character who did make it? Do they have a basic character flaw your protagonist lacks, is your protagonist conscienscious enough about human life that they will put the care into not making this mistake? Then portray that, think about what it would take to be such a good and competent person so as to not make that mistake and use your protagonist to show how this good person would be and work. Is this secondary character a good, competent person but the mistake is still a horrible one you find hard to reconcile with, if so how shall they reconcile with it? Is this moral journey interesting to you, and if so might it not be worth giving it to your protagonist? If you struggle to reconcile being a good person who has made this mistake - what does that mean for the world you built, that this is a thing that can happen? How do people exist in it? Can it be changed, should it be changed?