Grafana OSS time series panel showing wrong legend "Total" value

In my “Time series” panel, Grafana Version 11.0.0 (Ubuntu 24.04). Something strange is happening when I select multiple values in the “database” variable. This variable is querying a MySQL database.
The values shown in legend are different if I’m having more than one “database”.

Both images here are gathering 24h time range
Example with one value selected under “database” variable:

Example with two values selected under “database” variable:

The green value is showing basically the double amount from before. The plugin I’m using is Zabbix Version 5.0.2

This is the query data from the panel:

{
  "datasource": {
    "uid": "000000001",
    "type": "alexanderzobnin-zabbix-datasource"
  },
  "description": "",
  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "smooth",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 38,
        "gradientMode": "hue",
        "spanNulls": true,
        "insertNulls": false,
        "showPoints": "never",
        "pointSize": 7,
        "stacking": {
          "mode": "none",
          "group": "A"
        },
        "axisPlacement": "auto",
        "axisLabel": "",
        "axisColorMode": "text",
        "axisBorderShow": false,
        "scaleDistribution": {
          "type": "linear"
        },
        "axisCenteredZero": false,
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          }
        ]
      },
      "unit": "iops"
    },
    "overrides": []
  },
  "gridPos": {
    "h": 10,
    "w": 17,
    "x": 0,
    "y": 1
  },
  "id": 20,
  "options": {
    "tooltip": {
      "mode": "single",
      "sort": "none",
      "maxHeight": 600
    },
    "legend": {
      "showLegend": true,
      "displayMode": "table",
      "placement": "bottom",
      "calcs": [
        "min",
        "max",
        "mean",
        "sum"
      ]
    }
  },
  "targets": [
    {
      "schema": 12,
      "queryType": "0",
      "group": {
        "filter": "AWS-ACCOUNTS/enabled"
      },
      "host": {
        "filter": "/$account_host.*$aws_region.*/"
      },
      "application": {
        "filter": ""
      },
      "itemTag": {
        "filter": "/cluster-name: $database/"
      },
      "item": {
        "filter": "/.*?: SumReadWrite VolumeIOPS/"
      },
      "macro": {
        "filter": ""
      },
      "functions": [
        {
          "added": true,
          "def": {
            "category": "Alias",
            "defaultParams": [
              "/(.*)/",
              "$1"
            ],
            "name": "replaceAlias",
            "params": [
              {
                "name": "regexp",
                "type": "string"
              },
              {
                "name": "newAlias",
                "type": "string"
              }
            ]
          },
          "params": [
            "/$account_host-.*:\\s+([\\w-]+)\\s+([\\w-]+)\\s+([\\w-]+)/",
            "$2"
          ],
          "text": "replaceAlias(/(.*)/, $1)"
        }
      ],
      "trigger": {
        "filter": ""
      },
      "countTriggersBy": "",
      "tags": {
        "filter": ""
      },
      "proxy": {
        "filter": ""
      },
      "textFilter": "",
      "evaltype": "0",
      "options": {
        "showDisabledItems": false,
        "skipEmptyValues": false,
        "disableDataAlignment": false,
        "useZabbixValueMapping": false,
        "useTrends": "default",
        "count": false
      },
      "table": {
        "skipEmptyValues": false
      },
      "datasource": {
        "type": "alexanderzobnin-zabbix-datasource",
        "uid": "000000001"
      },
      "hide": false,
      "refId": "A",
      "resultFormat": "time_series"
    }
  ],
  "title": "$database: Volume ReadWrite IOPS ",
  "type": "timeseries"
}