Page number aligns to the first line when wrapping outline body in a fixed-width box

I might be missing something, but the solution from this topic doesn’t quite work for me.

Here’s how it looks:
image

It does fix the page number alignment, but my actual goal is to prevent the body text from extending into the page number area when it wraps to multiple lines. So this doesn’t fully solve my problem.