Re-opening following advice of Michael Hamann, as we have seen this problem reproduce on the latest LTS of XWiki.
Michael Hamann on 26/Jun/26 17:05
To add some context, the option "prevent unregistered users from viewing pages" is an officially supported option and thus the invitation application should work with it. The invitation application is explicitly designed for wikis with closed registration, so it makes sense that it supports fully private wikis where this option is selected. Similar to login and password reset, the invitation application cannot rely on wiki pages being available to guests.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.