If you are very obese, not eating for a while could theoretically work, but is not the ideal solution. The way it works though is if you make it by the stomach pains and stuff, once you hit ketosis, your body starts using the stored fat, hence you lose wait.
I think that’s how it works.