I'm in this situation right now. I will try to pass this with some therapy and exercises, because the medication decreases libido and I don't want to lose my girlfriend.
I would hope your girlfriend would have the maturity and care for you that this wouldn't put your relationship in danger. You know 50% of sexually active people are in a relationship where their partner is less interested in sex than they are on average (inevitable logic, not statistics) and if you break it down to year by year interest that number must go up (again logic).
That said, I'm going to make the brash counter-cultural statement that if you wait until after you commit to each other for life before having sex, then you worry a lot less about whether you are going to lose your partner over sex. If a necessary medication causing a libido blip is enough to derail your relationship, maybe you should consider pushing sex further up the commitment ladder?
In a sufficiently long relationship, there will be periods during which "satisfying each others' sexual needs" is difficult or impossible.
Couples I know have had trouble due to depression, childbirth, work-related travel, injury, and a year-long coma. While sex is a valid and important part of the relationship, it's also important to be able to weather periods of difficulty.
I should also note, depression tends to make one less capable of meeting other important relationship needs. If treatment causes a temporary drop in libido but improves those other areas, that should be a net positive. Thus, I submit that if a relationship gets derailed by such treatment, there were deeper issues in play.
Sometimes it's unavoidable, but it's a concern that's worthy of consideration, and saying shit like "just don't have sex until you're married lol" isn't helpful.
The way you choose to build a relationship has a lot to do with how well you are able to sustain it through certain types of difficulty.
The comment you were responding to said something considerably more nuanced and interesting than "lol" in conjunction with the "don't have sex until you're married" part. It's OK if you disagree, but please do so in a more thoughtful way.
What I found interesting wasn't so much what was said as the unstated assumptions behind it. The comment was in any case almost deliberately useless in how to handle an existing relationship that already entailed sex.