If you log into the gateway web configuration, and then navigate to Config/OPC UA/Device Connections (http://localhost:8088/web/config/opcua.devices?18) you will never be logged out of the gateway web session (or at least I never am). Most of the other pages logout after the User Activity Timeout configured under Config/Security/General (I say most because I have not left a page open on every configuration option). But, for the device connection page I can leave a tab open for days and it will never be logged out, and I can then navigate from that page to other pages and make changes, so the login permissions have remained active for the whole time the Device Connection page was open.
Current version is 8.1.26, but I think this behavior has been around for some time.