I'm not sure when this stopped working but lately I've been doing a lot of disclaimers and it seems like After Effects' justified text paragraph modes are broken (whether it's Last-Left, Last-Centered, Last-Right, or Justify All.) Words overflow out the right side of the text box, and I have to manually edit and shift-enter line breaks in after the next-to-last word on those lines (and then pull up the rest, which changes the results of subsequent lines, etc.)
I was still on AE 2023 but recently upgraded machines and got on 2024, going from Windows 10 to 11, but can say that it definitely was broken in 2023. Then I installed the current beta (24.2.0) to check and it's still broken there too:
![bad justification.png bad justification.png](https://community.adobe.com/t5/image/serverpage/image-id/642827i453693522F4C937D/image-size/large/is-moderation-mode/true?v=v2&px=999)
As you can see the first line is fine, the next 4 aren't, the following 4 are, etc.
Font doesn't matter; size doesn't matter; changing either does give you different results obviously, but still will result in many jagged right-hand lines. Photoshop and Illustrator format correctly.