It looks like you used the system templates directory. There is also a user templates directory, which may be a better place to store them.
On Ubuntu (and possibly other Linux distros,) go to Tools → Options… then expand LibreOffice, and select item Paths. In here, you’ll see two paths listed. The first is your system default that you have listed in your question. The second is your user path. You may also add additional paths, and select which one you would like to be the default.
On macOS, if you go into LibreOffice Preferences, under the LibreOffice section there is a Paths subsection. In there, you’ll find an entry for Templates. There are User Paths and Internal Paths listed there. Store your templates in User Paths instead of Internal Paths.
Templates stored in the main system templates directory may be lost in certain re-installation situations. It’s a better practice to instead store them in your user template directory.