Here is how the tab character typically works:
Is there a way to have the same behavior when the text is aligned to the right and not the left?
That is, if we talk about the right page of a spread, the page number should be in the top right corner, and there should be the name of a current chapter to the left of it, and no matter whether the current page is 1 (that is, one digit), 10 (two digits), or 100 (three digits), the chapter name should stay on exactly the same place.
Here is something similar, but I use 5 nonbreaking spaces instead of a tab, and therefore the position of the chapter name depends on the number of digits in the page number:
The possible workaround is to use a single-row table where the page number is in the right cell and the chapter name is in the left cell.
But I want to avoid workarounds such as using tables or additional frames, and instead search for a solution that will use only characters. I have tried to insert "Right Indent Tab" (which can be found under Type > Insert Special Character > Other), but it works differently: the page number and the chapter name stay as far one from another as possible, like they are gunfighters who are going to shoot each other on a duel.