I just discovered that many Rishonim address this question. For example:
Tosafos to Taanis 11a s.v. אסור לאדם
אסור לאדם לשמש מטתו בשני רעבון - ואם תאמר הרי יוכבד נולדה בין החומות ואותו העת עת רעב היה וע"כ שימשו מטותיהן בשני רעבון ויש לומר דלכ"ע לא הוי אסור אלא למי שרוצה לנהוג עצמו בחסידות ויוסף לא שימש אבל שאר בני אדם שימשו
If you ask, Yocheved, who was born between the walls, and at that time it was a famine, so it must be they were intimate during the famine...an answer is that it's not prohibited for everyone, just those who want to act with extra piety. Therefore Yosef was abstinent but not others.
Chizkuni to Genesis 41:50
י"ל דיוסף היה לו לפרוש מתשמיש המטה לפי שאביו ואחיו שרויין בצער אבל לוי שהיה יודע שאין מחסור לאביו לא היה לו לפרוש, ואם בשביל יוסף לא אסרו הדבר בשביל היחיד.
You can say that Yosef should have been abstinent since his father and brothers were suffering in the famine. Levi however knew that his family wasn't lacking, so he didn't need to abstain. If [you'll ask] he should have abstained because of [the pain of] Yosef, the matter isn't forbidden just because of an individual.
The Chizkuni seems to understand the prohibition relates to having family members suffer. Not sure where he got that. Regardless, Rav Chaim Paltiel gives the same answer in the name of Rabbeinu Elchanan
Daas Zekeinim and Hadar Zekeinim ad. loc.
ואמר ר' יהודה החסיד דמה שאסור לשמש מטתו כגון נביא ששמע מפי הקדוש ברוך הוא שעתיד להיות רעב כגון יוסף שידע הדבר בבירור על ידי חלום פרעה אבל לוי שלא היה יודע הדבר בבירור לא היה נאסר לו
Rabbi Yehudah HaChossid answers that it's forbidden only for a prophet who is told in prophecy that there will be a famine, like Yosef, who knew through the dream of Pharaoh. Levi however didn't know as clearly, so intimacy wasn't forbidden.
They give a second answer:
ויש מתרצין דלוי ויוסף פליגי בפלוגתא דתנאי דפליגי במסכת יבמות דאיכא מאן דאמר התם מצות פריה ורביה שני זכרים ואיכא מאן דאמר דלא קיים עד שיוליד זכר ונקבה. ולוי סבר כמ"ד עד שיוליד נקבה ג"כ ולפיכך שמש כי עדיין לא נולדה לו נקבה ואמרינן במס' תענית חשוכי בנים משמשין מטותיהן בשנ' רעבון כדי לקיים מצות פריה ורביה. ויוסף ס"ל כמ"ד שני זכרים ולפיכך לא רצה לשמש כי כבר קיים
Some answer that Levi and Yosef disagree how many children are needed to fulfill pru urvu. Levi held that until you have a boy and a girl, so he continued to be with his wife during the famine as the gemarra says those without children are permitted to be together during a famine. Yosef however held that you've fulfilled the mitzvah with two boys, so he didn't want to further be with his wife once he fulfilled the mitzvah.
Hadar Zekeinim to Genesis 26:8 also says this answer, and adds two more:
עוד י"ל דלילה ראשונה של טבילה מותר. וי"ל דאינו אסור אלא ברעב שיש לו קצבה כגון של יוסף שהיה זמן הרעב קצבה שבע שנים
You could further answer that the first night after the mikveh is permissible. Also you can answer that it's only forbidden during a famine that has a set time, such as the one of Yosef which was set to be 7 seven years.
Subsequently I found an interesting explanation from the Panim Yafos to Numbers 26:59. He suggests that we actually hold you can't be intimate during a famine, even to fulfill pru urvu, because the woman isn't commanded in that mitzvah (Yevamos 65b). However, she is commanded in the Rabbinic mitzvah of lasheves yetzara, which obligates her to have at least one child (Shulchan Aruch Even HaEzer § 1). That means they're allowed to procreate during a famine if and only if he needs to fulfill pru urvu and she needs to fulfill lasheves yetzara.
We know Yocheved was Amram's aunt through her father but not through her mother (Sanhedrin 58b). Meaning, Amram's father Kehas was only half-siblings with Yocheved, as they shared Levi as a father. That means Levi had at least one other wife besides Yocheved's mother; i.e., Kehas' mother. Perhaps he only had sons with that wife, but never had any daughters. For him there was a mitzvah of pru urvu, and perhaps Yocheved's mother never had any kids. She was then obligated in lasheves yetzara, and both of them were permitted to procreate. Yosef's wife on the other hand already had two sons, so there was no permit for them to procreate further during the famine.