This easily explained: Ketamine seems to repair some kind of cell damage, thereby increasing neural plasticity.
That is a huge asset, but long endured depressions leave many unhealthy neural circuits over the years. These have be unlearned one by one, which takes time.
Ketamine increases freedom of thought and emotion, but you still need a goal and long-term plan to precisely target and unwork all the patterns that circle back to depression.
Luckily the entrypoint away from happiness is discernable and it is bittersweet: giving up, thereby reducing stress. Which is sweet at first, but turns into hell fast.