Portion sizes are probably a factor. Anecdotally they're a lot bigger than they used to be. Calories are cheaper to produce and restaurants put bigger plates in front of their patrons because it's a competitive advantage to serve bigger meals.
If I had to guess the big culprits are the increases in portion size and availability of cheap calories (corn syrup, oils, flours, etc.). You don't have to infer any major changes in individual behavior - people still finish what's on their plates, and still gravitate toward brightly colored boxes of junk in the supermarket (which are a higher % of shelf space than they used to be).
if all you did was eat fat calories, you would lose a ton of weight, because ketone bodies cannot be stored inside fat cells, only glucose fructose, etc. can.
If all you did was eat protein calories, then yes, you could gain weight via gluconeogenesis (conversion of protein to glucose, again for fat storage and energy needs), although it would probably take more calories than carb calories to do so (since conversion likely results in molecular and energy losses); there is no such biochemistry available for ketones from fat
Consider, for example, if you ate 10 boiled eggs before a meal at a Mexican restaurant instead of pounding the chips and salsa. Same calories, different feeling, different outcome.
The average American consumes 24% more calories than they did in 1961. [1]
The average American is also 24 pounds heavier than they were in 1960. [2]
Sure there may be other contributing factors, but this is the simplest explanation based on our most fundamental nutrition science.
People have eaten more calories every decade, and have gotten fatter every decade as a result.
[1] https://www.businessinsider.com/american-calorie-intake-last...
[2] https://www.usnews.com/news/blogs/data-mine/2014/09/04/study...