I would argue this is an org-roam bug rather than an org bug and so needs to be reported to the org-roam maintainers.
org-roam is not part of org mode. Peter Prevos <pe...@prevos.net> writes: > Hi, I use file variables on the first line of some Org mode files to indicate > the local Flyspell dictionary, e.g.: > > -*- mode: org; ispell-local-dictionary: "nederlands" -*- > > This line sets the dictionary to Dutch for this file only. > > This is useful functionality that allows me to indicate the language of files > other than my default language. > > It works great, except when I need to add an ID for use in Org-Roam using the > org-id-get-create function. > > The new drawer is placed on the first line of the buffer, so the local > variable > declaration moves down and is as such no longer recognised as it is expected > on > line 1. (File variable documentation: > https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html) > > There is an ugly workaround by placing file variables at the end of the file, > as > documented in the linked page. > > Regards > > P:)