It's been this way for quite some time on macOS.
It's not really a bug, it's a feature, just one that confuses many people ;)
Opt/clicking the green dot on a Finder will maximise 'to show all the information'. This will only reach the screen edges in either direction if there is enough content to warrant it. Also, it will not automatically re-flow icons in order to do it.
That's why it can look like different windows behave differently - they're following the same rules, which may not give the same visual result.
e.g. (intentionally small images}
one icon wide vs 3 icons wide vs list view… icon view expands downwards only, list view also expands wider to include all columns.
If you specifically want the window to fill the entire screen, then hold Opt ⌥ and double click any window corner.
There are variations on this, just double-clicking a corner will expand from the opposite corner until both clicked edges hit the screen edge. Similarly for double clicking any edge.
None of these double-click variants have an 'opposite'. They don't toggle like the green button variant.
There are also 'drag' variants of all these, grabbing an edge or a corner whilst holding Shift ⇧ or Opt ⌥ will show you a multitude of ways to expand a window - too many to really remember;)
These drag methods also work on file-pickers (file open & save dialog boxes.)