This is still true on master, but only for the legacy API, so closing as Won't Fix.
The supported rename path, XWiki#renameDocument(DocumentReference, DocumentReference, boolean, List, List, XWikiContext) (used by the Refactoring module and by the deprecated script API Document#rename), is not affected: when the target exists it does nothing unless overwrite is true, in which case the target is deleted first. The move is an atomic store rename (XWikiStoreInterface#renameXWikiDoc), not a copy + delete, and links are only refactored after it succeeded.
The problem remains in XWikiDocument#rename(...), which now only lives in xwiki-platform-legacy-oldcore (deprecated since 2.2M2 / 12.5RC1). It calls XWiki#renameByCopyAndDelete, which still ignores the false returned by copyDocument when the target exists, then refactors the links and deletes the source. Nothing in xwiki-platform calls it anymore.
Code still using XWikiDocument#rename should move to XWiki#renameDocument or to the Refactoring script service.
PS: This post was co-written with Claude Code.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.