Modern diets are only about 10,000 years old, and the calorie rich eating of today is less than 100 years old.
That's a bit of a fallacy there.
Corn, potato, beans, tomato, turkey, cocoa, peanuts, sunflowers (8-11% of vegetable oil comes from its seeds)... and many more.
All those didn't exist as far as the world is concerned until the discovery of America.
And so many more would only become common and thus cheap after being transplanted to Americas and farmed there on all that empty and rich land, with free slave labor, then traded with the rest of the world.
Sugar was known for thousands of years, but it didn't "take off" until 18th century.
And that's all just before we changed those foods to be better. Wind the clock back mere decades and look up Norman Borlaug.
The bread we eat today could not exist mere 50 years ago.
So, from one side, 10000 years as a limit to the "change in our diet" due to agriculture is nonsense.
From another, we didn't go out there into the wild, experimenting willy-nilly what to grow agriculturally.
We just picked the BEST food for US and planted and cultivated MORE of it.
We have an enzyme which takes a rather rare (in nature) sugar called sucrose and splits it into fructose and glucose so we could both get energy and save energy (eat our cake and have it too) from a single molecule.
We EVOLVED to be able to do that - so we planted crops that make more of that molecule.
Some of us have an enzyme which allows us to digest lactose and get energy from that too - after we wean off from our mom's milk.
So we bred cattle that produce THAT molecule (and fat, and meat, and hides...).
Some Japanese can digest cellulose cause they have special gut bacteria with enzymes which allow them to get energy from algae.
Why all those various ways to harvest energy from all those plants and animals?
Because there never was enough of it. We went hungry.
Again - India mere decades ago. Parts of Africa today. Europe and Americas before that, mere decades not centuries ago.
Heck... centuries ago we had nearly no way to preserve food.
Canning is an early 19th century invention. Refrigeration took decades more. Modern refrigeration took even longer.
Before that we ate when we could, what we could, stored some dried foods and prayed for short winters.
And we went hungry.
We did not "change our diet" 10000 years ago by content, nor did we do it by quantity until recently.
The fact that we ARE getting fat off of modern food PROVES that we have evolved to eat that kind of food.
We did not evolve to not spend those calories by sitting the whole day working, sitting while going from place to place, spending winters in comfortably warm rooms with all that cheap food we don't have to hunt, or plant, or harvest or even steal... right there at our arms reach.
There's no "modern" diet, in a biological sense. Same food, just more of it, more easily.
There IS a modern lifestyle and modern technology. Like cars, electricity, penicillin...
That's the bit we haven't yet figured out how to adapt to ourselves in a way that we get more benefits.
Just like we fixed plants to be more nutritious. Or edible.
There's a technology we figured out long ago that allows us to digest otherwise indigestible or poorly digestible food.
I.e. To get more benefits out of food by adapting it to ourselves.
It's called cooking.
There is a science that's equivalent of cooking for modern life, but it is in its infancy.
It's called ergonomics.
But it is where cooking used to be back when we would scour the ground after a forest fire, looking for animals that got cooked alive.