My canvas recttransform.rect.height don't change properly

Hi, I have a Canvas where my UI belongs in.

I get the canvas recttransform like this : canvasRectTransform = canvas.transform as RectTransform;

Inside i have a panel whose position depends on the canvasRectTransform .rect.width.

My issue is that when i play my game in editor and change my game resolution (with the mouse i scale the view window of the game) to reduce its height (eg having a landscape mode), my canvasRectTransform.rect.height don’t change accordingly !!! (Stay at 600)
Instead it is the width that changes (increasing values) ?!

It is not what I want : if i reduce/increase the screen height, the canvasRectTransform.rect.width should stay the same and the canvasRectTransform.rect.height should change accordingly.

How can you explain this behavior and how to correct it ?

Thanks for any help.

I have to add something since i suspect it is related : In my canvas Scaler module, the Screen match mode is set to Expand as it adjust the UI both vertically and horizontally as i change width or height of the game window.