Inconsistent window size when using GUILayout.Window

Hi,

GUILayout.Window has changed behavior between old editor UI (pre 2019.3) and the new one. Here is a simple code that shows the problem:
for (int j = 0; j < 5; j++)
GUILayout.Window(j, new Rect(j * 50, 5, 50, 50), null, “”);

And here are the results:

Old UI
6381759--711081--upload_2020-10-4_21-14-3.png

New UI
6381759--711084--upload_2020-10-4_21-14-18.png

You can see that the rectangles are smaller in the new UI. I want to get the same size of the rectangle, whatever the size of the shadow is.

Any help is appreciated.
Thanks

I noticed this issue happens only when the method is called in an Editor window

Old UI
6386208--711654--upload_2020-10-6_0-15-48.png

New UI
6386208--711657--upload_2020-10-6_0-17-3.png

For those interested in the explanation, I found that the default style for the windows (GUI.skin.window) is different between old and new UI. And even when using the same values, I got different results.