Yeah that's physics unfortunately. To get the same battery life, if it gets smaller in one dimension(s), it has to get thicker in the remaining dimension(s).
Not a total 1:1 relationship though, since the smaller screen uses less power--but screen size is not the only factor of battery usage as some people here seem to be suggesting. The screen is only a fraction of the energy budget. It may be the largest single fraction in many cases, but it's nowhere close to 100% of the energy usage (unless maybe one uses their phone almost exclusively as a white screen and no other function), and probably not even majority. So while the smaller screen would help, the battery would still have to get thicker. And proof of this is to just look at the battery life of iPhone 13 vs 13 Mini; or the 14 vs 14 Plus, etc. Identical phones except length and width, and the larger phone has the longer battery life--conversely, the smaller phone has the shorter battery life. That's a significant reason why people like larger phones--for some the longer battery life is even more important than having the larger screen.