Security setup needs to be different for each company

I have a scenario where a user needs to have access to Bank in company A and General Legder in company B

I set up 3 domains

Domain A which contains company A

Domain B which contains company B

Domain AB which contains both companies A and B

I created 3 user groups

Group BANK-A which has access to the Bank module in domain A

Group GL-B which has access to the General Ledger module in domain B

Group CHANGE-CO which has read only access to the Administration Table Company Data in domain AB. This is so I can change between company A and B

I created a user nemed Test and have given him rights to all three groups. The default company for user Test is set to company B. After setting all of this up, I restarted the AOS.

The expected result was to have the Test user be able to access to the Bank module in company A and the General Ledger in company B, and the ability to change back and forth between company A and B

The actual result is that when the Test user logs in, access is available to the GL in company B. When the user switches to company A there is no access to any module.

Actual result