https://bodyrecomposition.com/fat-loss/how-we-get-fat.html/
Never mind the clickbait-ey domain. Lyle McDonald is a nutrition authority and well respected. Though on forums he’s self-admittedly volatile.
21 years ago (I mean this literally, I read him then) he was touting on MFW how the discovery of leptin was going to render dieting obsolete in less than a decade.
He has a lot of good content, but it's always decisive, even when some is rong.
Anecdata, everyone's favorite - I've seen someone gain no weight eating near 100% protein, while way over their TDEE. Kid you not, 4000 kcal of lean protein and mustard.
Also morbidly, you've got alcoholics (spirits), also traditionally under weight while consuming far in excess of their TDEE in ethanol (7 kcal per gram).
So some of it can be tested in the field!