Grafana logout when user is inactive

I’m using Grafana version 9.4.7 with Docker, with this configuration in docker-compose.yml:

grafana:
    hostname: grafana
    container_name: grafanaContainer
    image: myrepo/grafana
    ports:
      - 3001:3000
    volumes:
      - ./grafana/data:/var/lib/grafana
      - ./grafana/log:/var/log/grafana
      - ./grafana/config/custom.ini:/etc/grafana/grafana.ini
      - ./grafana/config/ssl:/etc/grafana/ssl
    restart: "always"

The problem that I’m facing is related to the users logout: I would like Grafana to logout when I close the browser. I tried with this configuration:

[security]
allow_embedding = true
[server]
http_port = 3000
protocol = http
domain = localhost
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
serve_from_sub_path = true
[auth]
# The maximum lifetime (duration) an authenticated user can be logged in since login time before being required to login. Default is 30 days (30d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month).
login_maximum_lifetime_duration = 10h

# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
login_maximum_inactive_lifetime_duration = 10s

# How often should auth tokens be rotated for authenticated users when being active. The default is every 10 minutes.
token_rotation_interval_minutes = 10

Expectation: closing the browser and opening it after 10 seconds (login_maximum_inactive_lifetime_duration), a new login is requested. Remaining in the browser, for 10 hours (login_maximum_lifetime_duration) the login is not requested.

Reality: a new login is requested every 10 seconds also if I keep the browser open.

Do you have any suggestions?