Permission denied for __pycache__ folders

When doing bench update I got error which stated Permission denied for the __pycache__ folders of the apps (including frappe and erpnext).
Looking at the owners, all __pycache__ folders are owned by root (instead of my frappe user).

I just reinstall the system on fresh server (CentOS 8) and get-app the applications.
One of the instruction to install on CentOS 8 is to use sudo to pip3 install frappe-bench. Is it possible that the cause of this error is this using of sudo?
Thank you for your response.

It turns out that the site_config.json is also owned by root.

I found why this happened.
I have bench-manager installed on my site. Everytime I open the Site doctype it automatically saved. And during this save it change the owner from my user to root.

And it also happen to other sites on the same bench.

Is this the correct behaviour?
If not, why it happen?

Thank you.