Custom home env variable for all apps

I read that changing location for ~/.var/app is not possible. And I found this blog post with a workaround:

Run the flatpak app with a different HOME env variable.

env HOME=/path/to/your/custom/flatpak/home flatpak run your-app

My question is: how to make this new home become default home for all apps, so that when I install new flatpak apps they will have their configs there. I don’t want to change execution command for every app manually.

Is this solution safe from sandboxing / security point of view?