With the writing-mode property value set to vertical-rl the end of the element in the block direction is changed from bottom to left, and this also affects the scroll-margin-block-end property.
In this example, snap position is set to start in inline direction, which now is on the left side because of writing-mode value. Scroll-margin-block-end is also on the left side because of writing-mode value. So the element in focus should snap into place with a 20px distance to the bottom of the container. But instead, because of the writing-mode value, the element in focus is offset by a 20px margin between child element and container on the left side.