The gemara has 2 main categories when a person would have to give up their lives (based on Ran):
1. Three severe aveiros (avoda zara, arayos, murder) - The gemara implies clearly that this applies even in private and even when there is not gezeira of sh'mad. The Ran explains that this even applies when they are doing it for their own pleasure because that distinction only applies to when the requirement of giving up one's life is kiddush hashem, but not when the requirement is the severity of the issur. Even for what is considered אביזרייהו, meaning that they are connected to these three such as pleasure from arayos and avoda zara one must give up their life. The only exception within the realm of these three aveiros is when the aveira is violated passively, קרקע עולם. One is only required to give up their life to avoid an active violation, but not to avoid a passive violation.
2. All other aveiros - One must only give up their life if it is public which means in the presence (or awareness) of 10 Jews, or if it is a time of sh'mad. Even when it is done publicly, and/or a time of sh'mad there are two exemptions. First, if the aveira is violated passively, even if violated publicly at a time of sh'mad one doesn't need to give up their life. Secondly, if their purpose is for their own pleasure not just for the sake of causing a Jew to do an aveira, one doesn't have to give up their life.
It is important to fully understand the exemption of קרקע עולם. Although the gemara only uses it within the context of permitting a public violation, not to be matir the prohibition of adultery itself, Tosafos and the Ran both understand that it would be matir even the violation of adultery. This essentially means that the rationale of קרקע עולם is not only a "matir" in the realm of kiddush hashem, but even for the big 3 aveiros which are prohibited due to their severity. What is the rationale behind this exemption? Tosafos seems to focus on the aspect of קרקע עולם being שב ואל תעשה, meaning that the prohibition is being violated passively rather than actively and understands that even murder which is violated passively (although Rav Chaim takes issue with the example Tosafos offers), would be subject to this heter. Tosafos seems to understand that when a prohibition is violated passively it is far less severe than one violated actively, and therefore doesn't demand sacrificing one's life for it. The Ran explains this somewhat differently. The Ran considers the exemption of קרקע עולם not to just be a passive violation, but a situation where it wouldn't help to give up your life because they could anyway force you to commit the prohibition. For example, when a woman is threatened to be killed if she doesn't commit adultery, she doesn't need to give up her life since they could decide to rape her regardless of her decision. The difference between the Ran and Tosafos is a hypothetical situation where a woman is being threatened to commit adultery or they will kill her, but for whatever reason they wouldn't be able to rape her against her will. According to Tosafos the exemption of קרקע עולם would apply since the issur will only be violated passively, whereas according to the Ran it will not apply since without her consent they couldn't force her to violate the issur.
I would suggest that this machlokes would be dependent on a machlokes Rashi and Tosafos how exactly to understand the logic of מי יימר דדמא דידך סומק טפי, דילמא דמא דהוא גברא סומק טפי. Tosafos holds that one cannot murder to save their life since they have no reason to assume that their life is more valuable than their friend. In a predicament of my life vs. his life, the Torah demands being passive. It follows that if the murder can theoretically be violated passively, I can commit a passive murder to save my own life. From this Tosafos extrapolates that for any passive violation one need not give up their life. Rashi on the other hand seems to explain the logic somewhat differently. Rashi understands that the exemption of וחי בהם - ולא שימות בהם, which is normally the concept that allows someone to violate an issur to save their life, doesn't apply to a situation where a life is going to be lost one way or the other. Therefore, the heter to violate an issur to save one's life doesn't apply to a situation where one is being threatened to kill. Based on the approach of Rashi, the logic of allowing oneself to be killed is not "be passive", rather the logic is that he has not heter to violate the issur of murder to save his life. It should follow that even if the issur of murder is being violated passively (which may only be theoretical), or even if the issur of adultery is being violated passively, one must still give up their life in order to avoid it. Perhaps the Ran understands like Rashi and therefore has to come up with another logic to explain the exemption of קרקע עולם, such as they could have raped her anyway.