The zoom button (option-click the green traffic light button, or double-click the title bar) in the (current) macOS finder is still
supposed to do that, if Finder's in its "spatial" mode (turn off the toolbar and, optionally, switch to view "as Icons"-- back in the day, there was a window control that did this in one step).
It's actually broken in current macOS, though-- using the zoom button on a Finder window ends up forcing some of the content underneath the title bar where you can't reach it. Guess that shows how much attention Apple's putting into the "little details" of their operating systems these days (very little, it seems).