EditorWindow position pixels vs Camera pixels

So the docs say about EditorWindow.position:

and on Camera.pixelRect:

screenshot with debug:


as you can see the editor window is bigger than the cam in the game window.
but the debug for the cam pixel rect is:

c; (x:0.00, y:0.00, width:1184.00, height:666.00)

while the editor window rect is:

p: (x:0.00, y:94.00, width:749.00, height:410.00)

can some one explain the relation between the two.
as you can see i would like the instantiate RawImages based on the Rects drawn in the editor window.
but i can’t seem to get the postion and scale relative to the camera.pixelRect

ok i had my canvas set to scale with screen size.
so adding the following fixed it.

CanvasScaler cs = GetComponent<CanvasScaler>();
cs.referenceResolution = new Vector2(Camera.main.pixelWidth, Camera.main.pixelHeight);