I am not sure which translation you are using and where you see that "living outside of Israel is itself a transgression". Are you taking this from the Koren interpolation?
The core of the gemara is
One who stands naked in Babylonia in a dream, he stands free of
transgression. [If one dreamed that he stood naked] in Eretz Yisrael,
[he is] naked without mitzvot.
Artscroll explains that there are many commandments one can only fulfill in Eretz Israel (e.g., teruma, maaser), so one who dreams he stands in Israel without mitzvot failed to avail himself of the mitzvot available to him there. On the other side one who dreams he stands naked outside Eretz Israel (the beginning of the gemara you quote) resisted the many sins of inhabitants there.
This being said, there are a number of other statements in the gemara that are critical of residents outside Israel, e.g., a famous one in Ketubot 110b
anyone who resides in Eretz Yisrael is considered as one who has
a God, and anyone who resides outside of Eretz Yisrael is considered
as one who does not have a God.
As the Ramban explains (Vayikra 18:25) "the essence of all of the commandments are for those that are dwelling in the land of the Lord" and "dwelling in the land of Israel is equal to all of the [other] commandments in the Torah".
So every Jew should have the ambition to live in Israel to perform all commandements in their proper place. If they are temporarily prevented from doing so for various valid reasons (e.g., earning a living, family, studying Torah, taking care of their community), it should be their ambition in their heart until God allows them to fulfil it practically. And we see that many rabbis did move to Israel once they got the opportunity.