I'll attach a test case. horizontal-tb and vertical-lr work because the origin is the top left and the scrollbars are on the bottom and right.
Created attachment 122131 [details] test case
Investigating as I have a layout test that is hard to make an expected result because of this bug.
Created attachment 122823 [details] better test case
This seems non-trivial to fix. It works in RTL mode because the layout origin is relative to where the text start (top right corner in horizontal-tb) and the overflow is computed properly relative to to where the text starts. In the horizontal-bt or vertical-rl case, the overflow is still computed based on the top left corner.
The two last tests in "better test case" are invalid. direction:rtl means that initial inline scroll position will be at the logical right, but Latin is still written left-to-right, so the first part of the words will typically be missing.