You can't do it in a function node, but you can do it in package.json
If you look there after you have installed the module you will see it there, along with a definition of valid versions. Make sure it stipulates only the correct version and it will always be that version. Provided you do not install a different version instead.
This is exactly what i tried, adding the module name incl. the version qualifier. It installs the specified version and I see it in the dependencies, but the Node-Red log prompts with "Error: Cannot find module 'firstname.lastname@example.org'".
So, referencing a specific in the "Modules" list does not fully work. It installs the modules in the specified version, but it can't load it, because it look for a module name 'email@example.com' although it is installed with name 'mymodule'.
My workaround: I will not use 'Modules' feature in the function node, will install the module with a classic "npm install firstname.lastname@example.org" in my docker initialization, make it a global requirement in the 'settings.js' and get it via 'const myMod = global.get("mymodule");'
Thanks for the update. I think that is actually a bug so you might want to raise an issue against the node-red repo.
Since you can install with a version modifier, node-red should really be able to cope with that or should reject the install. I know that on uibuilder, which has a similar interface for loading npm modules that are mounted as web endpoints, it does cope with version modifiers.