As reported in IDEMPIERE-4175.
In the test-postgresql and test-oracle servers, sometimes the session timeout UI is shown when changing roles, it is not consistent, it happens sometimes the first time, sometimes it takes more attempts.
I tested with the Brave browser.
Steps to reproduce:
Login as SuperUser
Select the Garden Admin role
Click on change role
Select system as the role
The home UI is shown as System (or the selected role)
The system timeout UI is shown, when you click continue, the GardenAdmin session is shown again.
Attached you can find a video showing the behaviour