Interesting that it doesn't specifically call out Anti-Virus scanning (which does occasionally result in at least one of these scenarios). I've seen many SQLite database become corrupted and the best you can do is have a backup.
I had one machine on my entire client's network that could never download a LibreOffice document without it being corrupted.
Turns out it was kaspersky intercepting network calls, and deciding it was a very dangerous piece of file, and it would truncate it completely silently.
After wasting a non-billable afternoon on it, I just disabled the antivirus out of desperation and figured it out.
The solution was to generate a self signed certificate and TLS the connection and prevent the bugger to MITM us.
Since this day, even on a local network with behind a proxies and using a VPN, I still use https for all the services if I'm allowed.
if processes lock the file shouldn't AV refrain from reading or even writing it?
SQLite has code to work around anti-virus scanning, by doing retries while the anti-virus tool is processing an operation. I've not seen anti-virus tools result in corruption on the SQLite forum.