You mean on the screenshot the Dock is minimized and the window doesn't reach the bottom of the screen?
If you can't make the window longer or if clicking the maximize button doesn't make it bigger than it's probably not possible. It's not that big a deal, is it?
If by "it", you mean removing the dock ---- Sure, you can hide the dock, which will mean that new windows will not be affected by the relative position of the dock.
You can also move the dock to the right or left side of the screen.
Then you will have no need for a gap at the bottom edge.
Or, if you just mean removing the gap, then move the window that slight distance --- gap gone
Dock is set to auto hide.
When i move the window to the bottom and stretch from top window to top menu bar then i click minimise and expand windows goes back to having the gap again.
Dock is set to auto hide.
When i move the window to the bottom and stretch from top window to top menu bar then i click minimise and expand windows goes back to having the gap again.
Just tried this a couple of different ways.
There's a built-in gap at the bottom when you maximize a minimized window.
Appears to be nothing that you can fix when the Dock is positioned at the bottom.
But, there's no gap added when the Dock is positioned on the right (my preferred location since I first used OS X 16 or 17 years ago)
Maybe that's something that you can consider, as you hide the dock anyway