^^ Unfortunately that is false.
It is true that if you eat more calories than you burn, a LARGE amount, in one sitting, your body can not deal with it all and actually passes some through.
A GREAT example is when I was anorexic recovery and my doctor was talking about binges I had done (talking like 2 years ago here, last binge was a year ago

) he stated: "Ok. If I eat an entire bag of M&M's, a pint of Ben & Jerry's and then spoon butter into my mouth, am I instantly going to gain 10lbs? No. Will I gain weight? Yes. Will I gain the amount of pounds in the calories that I consumed? No. The body can only handle so much calories at one time before it expels some of it as waste. If I ate that much in one sitting, not only would I gain a pound or two if I'm lucky, I would take one of the biggest sh!ts or messiest, either one, at my next bathroom break."
And to show you how that is true, simply eat 10,000 calories in one sitting (most of us can't, others can easily, such as dedicated lmao -> 72oz steak man! ilu) but yeah, besides water retention, once that resides, you don't actually gain all the fat you should have in calories.
Body expels some amount of excess calories as waste. Another reason ectomorphs have hard time putting weight on because their body just does it more than say an endomorphs which just has a good metabolism at absorbing calories.