Here are two possibilities:
- Your anti virus (such as AVG) “locks” the file from further alterations after the first save
- Your files are not being closed properly and LO is crashing on close, leaving the lock file in place. A lock file has a name like this
.~lock.[filename].odt# in the same folder as the original file (turn on Hidden items in File Explorer > View. Assuming that LibreOffice is closed then deleting this small text file will allow the file to be opened normally again.
1 is easier.
Just add soffice.bin to the list of allowed programs in the anti ransomware settings. Go into settings and then look for something like anti-ransomware or folder protection. Have a look at the blocked apps list, if you see soffice.bin in there change it to Allowed (you might have to read AV help if not obvious). Otherwise go to the Allowed Apps setting and allow soffice.bin, this might not be easy so you might have to change the file type to All to see it and to add the Allowed list. Or you might have to start entering Soffice.bin before you can select it in the navigation dialog
2 is harder
You haven’t given your operating system so I assume Windows. You need to identify why the crash happens.
Get into the habit of saving and closing your files when you have finished working on them. Microsoft implies you can leave files open all the time but Windows will shut them without warning (crash them) if it needs to reboot after an automatic Windows update; this will happen once a month but can be more frequent.
If you are using a laptop on battery, shutting the lid will put the computer to sleep, but when the battery runs down Windows might write everything to disc, might close without saving, or might even crash out. Only the first option keeps your files secure.
I am in the habit of shutting down the computer when I have finished, this means the next time I start, I start with a clean memory. You might naively think that clicking Start Menu > Power > Shut down will shut down your computer in an orderly fashion; it doesn’t. The default for new installation of Windows is for Shut down command to be hijacked into Hibernate. You can use Power > Restart to restart the computer from time-to-time.
Or you can change the setting which is placed for your convenience by MS at: Click Start menu > Settings > System > Power & Sleep**, in the right-hand pane click the link Additional power settings, in the new dialog click the link Choose what the power buttons do. In the new window see if the Turn on Fast startup (recommended) option is ticked, if it is then click the link Change settings that are currently unavailable and untick Fast startup.
There are also other reasons why LO might crash when closing but see how you go.