With the direction property value set to rtl the end of the element in the inline direction is changed from the right side to the left side, and this also affects the scroll-padding-inline-end property.
In this example, snap position is set to end in the inline direction, so the element in focus should snap into place with a 20px distance to the right of the container. But instead, because of the direction value, the element in focus is offset by a 20px distance between child element and the left side of the container.