I found a way to make org-attach links resilient to refiling

You can make a separate org-roam node that contains a group of related attachments and insert a link to the attachment node in a different org-roam node.

The link to the attachment container node can be refiled to other org-roam nodes.

You can also set org-attach-use-inheritance to t if all you want to do is to attach a file to an org-roam node.

This is my org-attach setting.

(setopt org-attach-id-dir "attachments"
        org-attach-use-inheritance t
        org-attach-auto-tag nil)

I just create an org-roam node suitable for a group of related attachments and put them in the node. Since org-atach-auto-tag is nil, ATTACH tag is not going to be attached to my org-roam node.

This is flawed, but I don’t have a better way, yet.

Another way is to create an org-roam node for each attachment file and attach a file to it.

For example, if you want to attach abc.pdf, create an org-roam node named abc.pdf, and attach abc.pdf to it with org-attach.

If multiple attachments have the same name, you can include ${id} in org-roam-node-display-template, and use vertico for displaying completions vertically.

With org 9.8 and denote, you can manage attachments in a separate directory and even have live image previews.