This version of Unity is unsupported.

PanelSettings.screenMatchMode

public UIElements.PanelScreenMatchMode screenMatchMode;

Description

Specifies how to scale the panel area when the aspect ratio of the current resolution does not match the reference resolution.