iTerm now has a behavior that really annoys me. When I open multiple tabs and then close them one by one until only one remains, iTerm keeps the width of the single terminal window unchanged but shrinks its height on the screen, leaving an empty blank area at the bottom. I noticed that when I create a second tab, iTerm tries to increase its height. However, since I’m used to keeping iTerm in a non-fullscreen maximized window, this attempt to expand fails, yet the subsequent shrinking when closing tabs still happens. Is there any way to fix this? What I want is that when closing tabs, iTerm always uses the extra height to enlarge the terminal window.

normal window(biggest window)
create another tab
close other tab, and empty blank area at the bottom