I just soft-deleted a post that was the first on page #2 of a thread and now it's the post #21 of page 2 even when I have configured a maximum of 20 posts per page.
This makes sense that they are not included in the posts per page setting. If they were, then users who can't see soft deleted posts would notice that there are 19 or less posts on a page.