How best to share a Local DB lock, or kill other app instances on startup?

I’m using RocksDB in my game to store some data. Unfortunately, the game has trouble (missing data from the DB) if I fail to acquire the lock on the DB file, and only one app can lock it at once.

Customers have had an issue where exiting the game (apparently especially when it crashes) doesn’t fully close the application. It stays open in the background, and holds onto the RocksDB lock until someone kills it it in the task manager. I’ve tried to search for info, but it sounded like this happens a lot on Mac, but this game is currently Windows only. I’m also not operating on good info, since customer reports aren’t always detailed.

I’m considering some way of automatically killing the other process when our game starts back up. Is there a standard way to do this? When I tried to look it up, it sounded like there’s potential to get the game flagged by antivirus or antimalware tools for using the libraries that can search processes and close them.

Alternatively, is there a way to make sure Unreal closes fully after a crash etc, instead of hanging around?

Or is there a standard way to make all instances of the game share a common resource like a DB lock?