I know this probably isn't a great analogy, but maybe it's somewhat similar to the following scenario.
There has been an earthquake. A building has collapsed and two people are trapped under the rubble.
Doctors have assessed the condition of the first person and determined that their condition is poor, worsening by the hour and their prospects of survival are virtually non-existent.
They have also assessed the condition of a second person, who is very ill, but could quite likely be saved if they are able to get them out from under the rubble and treat them.
However, because of how they are positioned, moving the rubble from the 2nd person will almost certainly mean that the first person, whom they know will die soon whatever they do, will almost certainly die immediately.
Do you remove the rubble to save the second person, who risks dying the longer you delay extracting them? Or, do you wait until the first person's heart has definitely stopped beating to remove the rubble and save the second person?
At any point, of course, the rubble could shift and both people could die immediately. This risk increases the longer you delay the rescue. The chance of the second person surviving specifically increases the longer you delay the rescue.
What do you do?