Use a Right-indent tab (^y) instead of a regular tab. If you need a leader, add a custom underline to the tab using a character style.
I'd also set the "Balance Ragged Lines" option
I changed the TOC style to ^y but this didn't do any difference, but "Balance Ragged Lines" fixed the layout.
Though it may happen that the next TOC row starts with a leader as in:
Example of TOC text
I belive that there is no simple fix to automatically insert a soft break in the sentence if the width of the text is near the TOC paragrap style's Right-Justified tab. For example:
Example of TOC
Set the Right Indent to be say 20mm
Then set the Last Line Indent to be - 20mm
Use whatever figures suit.
I changed the TOC style to ^y but this didn't do any difference,
Then there is something else wrong.
It looks real nice now.
My last question is about the last break that ends the TOC, after last entry. Is this common that this is added. If so, how do I remove it? It makes my TOC text frame to overset every time I update the TOC until I have manually removed the break.
You must have a blank paragraph at the end of the document that has the paragraph style applied to it.
No. It's normal. TOC behaves like Word for unknown reasons and adds an extra return. You just have to delete it.
or leave the text frame a little bit longer than it really needs to be.