As long as the total screen resolution you are using is larger than the window size you want to use you can use this (C#):
browserDriver.Manage().Window.Size = windowSize;
If your screen resolution is smaller then you are out of luck. I tried different ways such as:
chromeOptions.AddArgument($"window-size={windowSize.Width},{windowSize.Height}");
Or even importing the move window function to resize a window:
[DllImport("user32.dll", SetLastError = true)]
static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int Width, int Height, bool Repaint);
// Example
MoveWindow(process.MainWindowHandle, 0, 0, windowSize.Width, windowSize.Height, true);
But none of these work. It seems that chrome does something different to prevent the window size from growing bigger than the screen resolution. With Firefox I didn't see this behavior.