I can reproduce this problem with a USB stick as well. I suggest changing the title to "Removable media icon stays on the dock after eject".
To reproduce, I've inserted my USB stick used to install Ubuntu, automounting it; Two items appeared, one that says "Ubuntu 19.10..." and another saying "casper...", then I ejected it with the command `sudo eject /dev/sdx`. The icon saying "Ubuntu 19.10..." is still there. The other is gone.
I can reproduce this problem with a USB stick as well. I suggest changing the title to "Removable media icon stays on the dock after eject".
To reproduce, I've inserted my USB stick used to install Ubuntu, automounting it; Two items appeared, one that says "Ubuntu 19.10..." and another saying "casper...", then I ejected it with the command `sudo eject /dev/sdx`. The icon saying "Ubuntu 19.10..." is still there. The other is gone.