When a person is forced to sin or he might be killed, the value of life comes before the Torah commandments. This is true to all Mitzvot except three serious offenses: idol worship, incest and bloodshed. This is true if a person is forced to commit an offense in private, but if it's in public, he is forbidden from doing even a "mild" transgression or even a custom, and sacrifice his life. However, if the purpose of forcing a Jew to transgress the commandments is only for the benefit of the non Jew and there is no intention to violating the Torah, the halacha is that even in public, he is permitted to transgress the mitzvah and stay alive.
Those who think that the struggle between Israel and the Arabs on the land of Israel is not a principle, and that the Arabs benefit only themselves, and they have nothing against the people of Israel settling the land, may think that Pikuch Nefesh (saving lives) rejects the commandment to settle Israel. But, it is clear that the struggle is much deeper, and that the will of the Arabs is to prevent us to fulfill the mitzvah of Yishuv Ha'artz (Settling the land) and all the spiritual benefits associated with the land of Israel. Therefore the rule is "Yehareg V'al Ya'avor" – a person shall be killed and not transgress a commandment.
Maran Rabbi Tzvi Yehuda Kook zt"l, wrote in 5729 (1969) (L'hilhot Tzibur, 29) "There is no permission to transgress the double and absolute prohibition of giving permanently part of our land to Gentiles, G-d forbid. Every Israeli and every great Torah man, every government minister in Israel, every military man in Israel, must prevent and stop it with all courage and strength, and he will have "Siyata D'shmaya". In year 5737 (1987) he wrote (Eretz Hatzvi, 32): "Every Jew who is loyal to Israel must stand in devotion against this evil - basket of decadence - betrayal stupid and confusion of abandoning the land of our lives, and removing it from under our hands to foreigners who bundle against us. Like all compulsion, whether from foreigners or from Jews, this Mitzva requires Mesirut Nefesh (sacrifice) especially a mitzvah which is considered equal to all the commandments of the Torah. "
And to the claim that the compulsion is for enjoyment of the Arabs, said Rabbi Tzvi Yehuda (leaflet 5): "I announce and comment to you that these are things null and void claims and do not change anything the inquiry obliging them to it, - the pleasure of themselves is they will control this country, not us, and that we are commanded, like the Ramban and all generations, in the name of our G-d, King of the world, that they will not dominate here, in Jerusalem, Judea and Samaria, the Golan Heights and Jericho, but we will be governing here in our country…". He wrote (leaflet 17): Halakhic argument of "pleasure themselves" is trivia in our case. Enjoyment of themselves is to rule here, against the Torah command, as the Ramban wrote "The land should be under our government and not others".
Rabbi Tzvi Yehuda's words are clear: there is an obligation of Mitzvat Yishuv Ha'aretz, not to evacuate Jewish settlements in Israel. Hopefully, this question will never be in practice, "Ki Lo Yitosh Hashem Amo V'enahalto Lo Ya'azov" (Psalms 84, 14)