Janelle, I cannot believe that it is as simple as that. Even if he just “stored the whole thing” as weight, it wasn’t close to a 4 lb piece of cheesecake, was it? Remove the water from that piece of cheesecake, and what is left? Not much, as far as weight (and nothing that I’d think would have such an outlandish effect on body weight). “Keto” cheesecake - I take it your doctor was eating ketogenically, overall? I see no plausible explanation how that one piece would affect him for 2 weeks and to the extent of 4 lbs in the beginning. Doctor, had bariatric surgery - he’s got to be familiar with weight measurement and body functions - but I still suspect something’s not right, as stated.
Mike, I would firstly look to water retention and electrolyte balance. When fasting, the reality is that most of us will only lose around a half pound of fat per day, and that can be easily swamped by other things going on in the body on a daily basis, i.e. the scale will rarely reflect true fat loss or not, day-after-day. It’s only in the long run that things even out.
To actually gain 7 lbs in a week - man, that is some serious chowing-down. I don’t think it really works that way, especially if 24 hours corrects it.
I once ate a lot of salty pretzels, and swelled up that same day. Didn’t weigh myself, but later calculated that to maintain the normal body concentration of salt I would need to have retained 18 more lbs. of water. Making use of no salt consumption, potential glycogen depletion, and supposed diuretic effects of coffee or tea, I have lost more than 10 lbs. in a day, just to show that it can be done.