If she really knows about your preferences, and still wants to get the surgery, it means she puts her wellbeing/ looks above your interests. She has the right to do it, of course, but you also have the right to follow your desires. Also, there was never a better time in human history to be a fat woman than now, so if she really cared about you she would not go against your will.
My suggestion is to tell her openly that she will most likely be not attractive to you after the surgery, that you can her recover but after that you part ways.
It is only 2 years so separation will not be so painful. Much better than spending 10+ years in a relationship and then being unable to quit it due to various life shit.