I might be missing something, but the solution from this topic doesn’t quite work for me.
Here’s how it looks:

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.