Capture template for org-roam-bibtex to keep notes in single file

As the title says, I want to setup org-roam-bibtex so that I can capture notes for different papers/articles in a single file.

This is what is in my init.el:

(use-package org-roam-bibtex
  :after org-roam 
  :hook (org-roam-mode . org-roam-bibtex-mode)
  :config
  (setq orb-preformat-keywords
	'("citekey" "title" "url" "author-or-editor" "keywords" "file")
	orb-process-file-keyword t
	orb-file-field-extensions '("pdf"))
  (add-to-list 'org-roam-capture-templates
	       '("r" "bibliography reference" plain
		 (file "~/org-roam/org-notes/template")
		 :if-new
		 (file+head "~/org-roam/org-notes/${citekey}.org" "#+title: ${title}\n")))
  (add-to-list 'org-roam-capture-templates
	       '("w" "work bib reference" plain
		 (file "~/org-roam/org-notes/template")
		 :if-new
		 (node "Work notes")
		 )) )

(I also have some related org-ref and org-noter settings but this post is already pretty long.)

The template file looks like this:

* %^{title}
:PROPERTIES:
:Custom_ID: %^{citekey}
:URL: %^{url}
:AUTHOR: %^{author-or-editor}
:NOTER_DOCUMENT: %^{file}  
:NOTER_PAGE:               
:END:


- tags ::
- keywords :: %^{keywords}

The file Work-notes.org has its own org-id and properties at the start of the document:

:PROPERTIES:
:ID:       6afe41ce-2572-4c55-b624-f43e65d7ccc8
:ROAM_ALIASES: "Work notes"
:END:

On the line cite:wisemanTwoBellTheorems2014, doing C-c C-o will give me my helm popup, and choosing Add notes gives me the capture interface.

Hitting w gives me an error:

orb-edit-note caught an error during capture: Capture abort: Args out of range: 0, 0

and I am not shown the notes page.

It also adds :ROAM_REFS: cite:wisemanTwoBellTheorems2014 to the PROPERTIES drawer of Work-notes.org.

However, if I make a new Headline in Work-notes.org

* Symmetry breaking patterns in superstring models
:PROPERTIES:
:Custom_ID: wittenSymmetryBreakingPatterns1985
:URL: http://www.sciencedirect.com/science/article/pii/0550321385906030
:AUTHOR: Witten, E.
:ROAM_REFS: cite:wittenSymmetryBreakingPatterns1985
:NOTER_DOCUMENT: ~/Dropbox/papers/Witten_1985_Symmetry breaking patterns in superstring models.pdf  
:NOTER_PAGE:               
:ID:       8e376322-ee58-4b83-9b20-bc2d1d1d5447
:END:

And do C-c C-o on cite:wittenSymmetryBreakingPatterns1985, I get the option to Open notes, and am led to the correct headline and notes.

What can I do to make sure that I’m adding the desired behavior when I want to create notes for a citation? (If you have a simpler setup that is similar to what I want, please share!)

I think it’s related to creating an org UUID for the headline, but I’m not quite sure how to do this in the template.

I’m using org-roam-version 2.1.0, and emacs-version 27.2.