UIToolkit layout engine will always align element boundaries to the pixel grid in order to avoid antialiasing artifacts on edges.
When combined with non-integer scaling factors this can happen. If that behavior is not compatible with your needs, you can use the constant pixel size mode and assign an integer scaling factor to the PanelSettings object.
See https://docs.unity3d.com/2021.2/Documentation/ScriptReference/UIElements.PanelSettings-scale.html