The max size resolution in windows is 32,000 x 32,000, which is the maximum window size in windows
Yes but the question was about maximum window sizes at lower resolutions than that. It seems like it's the total resolution of the screens in each dimension (although it also takes scaling into account).
Incidentally
@Dystopia, when you set a window size, for some applications it gets saved in the registry (when you close the application). For example Notepad uses HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad and the values iWindowPosZZ (position X and Y for the top left corner and then dimensions X and Y). So you could look to verify what yours are coming to.
With my two 2560x1440 screens, the maximum size according to the registry is 4114x1170, but it's touching all four corners of the two monitors. Interestingly, this is due to the desktops being set to 125% scaling. It's actually creating the application window at the lower resolution which gets scaled up for display. When I drop it down to 100%, the size is shown as 5140x1460. I suspect that the extra is 10 on each edge for the border that Microsoft tries to pretend doesn't exist in modern Windows. (It also means it's not exactly 125% scaled since that would result in slightly different numbers.)
When I set the Notepad window to fill the screens at 100% scaling, so it would be saved in the registry, then changed back to 125% and opened Notepad, it immediately dropped it back down to the lower size, and a partially off-screen position. So Windows will NOT allow you to do anything to force it to be larger than the scaled screen resolution.