Special:Allpages on Wikidata currently exposes the titles of items as well as the titles of properties. Special:Prefixindex only exposes the title of an item. It would be nice if Special:Prefixindex also exposed the titles of properties.
LinkBeginHookHandler::doOnLinkBegin() only overwrites link texts when they equal the full title of the target page:
This is always the case for item pages because they're in main namespace, but not for property pages on Special:PrefixIndex, which strips the namespace name. Eventually, a hook like T76363 should be used.