When saving using "File/Save", LIBNAME is reset to the default setting from the Writer Options. It is possible to use "File/Save As" and specify the LIBNAME, but the value is taken from the global options instead of the LIBNAME of the current layout, if present.
The libname should not be part of the global writer options but taken from the current layout by default. The user should be able to edit it on "Save As" if needed.