This version of Unity is unsupported.

PanelSettings.scaleMode

public UIElements.PanelScaleMode scaleMode;

Description

Determines how elements in the panel scale when the screen size changes.