|You know it makes sense|
Star Trek timelines follow a particular logic (see page). But in the finale of Voyager, the Borg Queen follows a plan based on a somewhat different logic. It isn't put to the test, but it's an interesting question.
The Voyager finale "Endgame" starts some years in the future of where we last saw Voyager. Voyager eventually got home, and Kathryn Janeway is now an Admiral. She travels (illegally) into the past to bring Voyager home faster, in order to save lives and suffering. So there are now two Janeways on Voyager, the one who's been there all along (the Captain) and the one from the future (the Admiral). The short-cut home will involve going through the heart of the Borg, but the Admiral gives them future technology which the Borg cannot yet counter. However, when they are moving in, the Captain realizes that they are heading into a "transwarp hub", one of the keys to Borg power. She (the Captain) suspends the plan and turns back, thinking that this might be an opportunity to destroy the Borg, or at least their mobility.
The Admiral is disgusted, but eventually they agree on a plan. The Admiral sacrifices herself to infect the Borg Queen with a "neurolytic pathogen" which destabilizes the collective. As the Borg disintegrate, Voyager zooms home. However, the Borg Queen is still able to send one sphere after them. As it closes in, she says:
"Captain Janeway is about to die. If she has no future, you [Admiral Janeway] will never exist, and nothing that you've done here today will happen."
But this is a mistake. Firstly, it's true that if Captain Janeway dies she can never become the older Admiral who comes back and destroys the Borg Queen. But she doesn't need to die to change the future. If she merely succeeds in getting home, she may become an Admiral but surely she will not become the Admiral who came back to destroy the Borg Queen. In principle, she could come back again anyway, and sacrifice herself, in order to complete the circle, even though she would be a Janeway with a quite different life history from the Admiral we saw, thus creating a type of predestination paradox. This is unnecessary, though, because timelines don't work like that in Star Trek.
In changeable-timeline stories, it is assumed that a person who has come from the future, and changed something thus altering the future, is not affected by that change, at least while still in the past. In "Past Tense" (DS9) several characters accidentally time-travel to 2024. There they accidentally change events so that a man (Gabriel Bell), who was due to play an important historical role, is killed. Commander Sisko adopts Bell's identity in order to set things right. But if the Borg Queen's argmument was correct, surely Sisko and the others would never exist, and thus could not come back? In that case, history would not have been changed, so Sisko does exist, and ... Sisko would seem to be flickering in and out of existence. But perhaps Sisko's intervention before the change alters the case.
"Yesterday's Enterprise" (TNG) however is less ambiguous. Most of the episode takes place in an alternative timeline. Guinan persuades Picard that the timeline has been changed and that he should act to change it back. This requires sending a ship (which has come through a rift from the past) back again. Tasha Yar (who is dead in the main timeline but was still alive in the alternative timeline) goes back with it. Let's call this Tasha "TashaALT" and the Tasha who died earlier in the normal timeline "TashaNORM". TashaALT and the others who went back succeed in changing history. TashaALT however continued to exist, and lived several more years. She had a daughter Sela who turns up as a Romulan officer later in the normal timeline. Thus, TashaALT changed history, but continued to exist in the changed timeline, along with the changes she caused. TashaNORM never becomes the person who travels to the past to change it, and in fact at the relevant time there is no Tasha living, but that doesn't matter.
So even if Captain Janeway had died while trying to get past the Borg, Admiral Janeway's killing of the Borg Queen would not be undone.