Docker (rootless) containers are running but not showing in `docker ps`

Hello, I’ve installed NixOS in a VM following this guide.

In there I’ve installed Docker like so:

...
environment.systemPackages = with pkgs; [
   docker
];
  
virtualisation.docker = {
  enable = true;
};
...

This works fine, but later on I decided to run Docker in rootless mode and amended my config like so:

virtualisation.docker = {
  enable = true;
  rootless = {
    enable = true;
    setSocketVariable = true;
  };
};

And then rebooted, after which I noticed that docker ps lists no running containers, but btop does show the container’s processes as running:

The blurred out part is my own user.

I thought maybe that somehow containers from when Docker was still running as root were mistakenly started automatically after the reboot, so I changed my configuration.nix to disable rootless and rebuilt. docker ps still showed nothing, but the processes were still running so I rebooted again after which docker ps did show those running containers. I proceeded to stop them with docker compose down and enable rootless again in configuration.nix, rebuilt and rebooted again. This time around, docker ps lists nothing and the processes also aren’t running anymore.

So I thought it was fixed, but a day later (today) I SSH into my VPS to play around with nixos-generators and ran docker compose down to free up resources because I noticed the generator takes a lot of CPU. I open btop in another window and coincidentally notice the containers are still running despite docker ps not listing any running containers.