According to this Wired report, even as less time as a week in really high altitudes is seen to have caused sustained weight loss.
A study showed how sedentary people who spent a week at an elevation of 8,700 feet lost weight while eating as much as they wanted and doing no exercise. A month after they came back down, they had kept two-thirds of those pounds off.
So the high altitude had the effect not only of making the people lose weight, it also helped keep the weight off for a month thereafter. The study does not show what was lost from the body by way of the weight, mostly muscle mass, fat, or water weight.
The results of the study are however not the basis for all of us to go migrating into the mountains. The safety of having obese individuals suddenly shift into the higher altitudes is not established since even a moderate altitude may worsen inflammation and increase their chances of heart attack or other serious problems.