Docker Alloy generates apparmor ptrace denied messages

I run Alloy in a Docker container with the following compose file:

services:
  alloy:
    image: grafana/alloy:latest
    container_name: alloy
    volumes:
      - ./config/config.alloy:/etc/alloy/config.alloy
      - /var/log/journal:/var/log/journal:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 12345:12345
    command: [
      "run",
      "--server.http.listen-addr=0.0.0.0:12345",
      "--stability.level=public-preview",
      "--storage.path=/var/lib/alloy/data",
      "/etc/alloy/config.alloy",
    ]
    restart: unless-stopped
    privileged: true

It generates lots of the following messages:

AVC apparmor="DENIED" operation="ptrace" profile="docker-default" pid=1854 comm="tokio-runtime-w" requested_mask="read" denied_mask="read" peer="unconfined"

I was expecting that privileged: true would allow ptrace