Over here is the same issue encounterd.
And don’t yet know how to solve it.
(original posting got no issue resolving answer)
Find attached a .png with two login screens.
On the lefthand side a xwiki with content, but noforgot your password button
On the righthand side an empty wiki (due fresh docker container install) withforgot button.
I think you added some rights on the XWiki space, thus affecting the pages: XWiki/ForgotUsername and XWiki/ResetPassword, that’s why they are not displayed for Unregistered Users.
There is an issue reported about this problem XWIKI-14544 . Unfortunately having so many issues to work on, this has not been prioritized yet. If you would like it to be fixed, you can at least vote for it.