Database files keep ownership keep being changed

Hi everyone,
I am running Home Assistant on py virtual env on Raspbian Buster.
Every now and then, the files:

home-assistant_v2.db
home-assistant_v2.db-shm
home-assistant_v2.db-wal

keep changing ownership from homeassistant:homeassistant to root:root creating problems in both starting the homeassistant service and running the recorder component.

Does anybody have experience on this issue or have any idea on how to approach it?

Many thanks!