This is a description of the default locking mechanism: https://www.sqlite.org/lockingv3.html#rollback
You might get this behaviour on write if the temporary files Sqlite uses to ensure consistency cannot be created/written in the location the database is in. This will be the case on Windows if the database is in the Program Files folder.
You might get this behaviour if a separate process (possibly thread) has a long running write to the same database.
If you can reproduce this with only a single process accessing the file please post a complete, minimal program that reproduces it.
Bookmarks