Possible to change domain when changing companies?

I have self-hosted installed with three companies created.
I have three domains pointed at the installation, and I would like to use one domain per company.

This seems to work fine if I login at the correct domain at the beginning. For example, if I login to company1.com and send out invoices from Company 1, it will use that URL in my invoices, client dashboard, etc. However, if I switch to Company 2 while logged in to company1.com, it still uses company1.com on invoices and links.

Is it possible to configure multiple domains in the .env file, similar to the way that it already can configure multiple mail configurations for each company?

Ideally I would like to have this:

APP_URL=https://company1.com
1_APP_URL=https://company1.com
2_APP_URL=https://company2.com
3_APP_URL=https://company3.com

I tried this, but it didn’t seem to work.

You’d need to setup separate installations of the app