Ubuntu is ‘Bionic Beaver’ and ‘Focal Fossa’ - tested on both with identical results.
The output of ‘whereis darktable’ on both machines is
darktable: /usr/bin/darktable /usr/lib/x86_64-linux-gnu/darktable /usr/share/darktable /usr/share/man/man1/darktable.1.gz
My luarc-file is in $HOME/.config/darktable
I have a print-statement in luarc, which I see only when starting darktable in the terminal in the directory $HOME/.config/darktable
If I start darkable from a terminal in my homedirectory, the output of the print statement never appears.
As it is to be expected, my lua-extensions only show up when the application is startet from $HOME/.config/darktable.