The desktop environment packages that tasksel uses (task-gnome-desktop, task-kde-desktop, etc) can be found towards the bottom of the list at: https://packages.debian.org/trixie/task-desktop. In theory, you can just uninstall the task-your-desktop package which takes away everything that DE came with. If that doesn't work or doesn't play well your earlier manual uninstallations, take note of the dependencies that the task packages pulled (including recommendations) and go about uninstalling the dependencies layer by layer.
Debian operating system
Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian provides more than a pure OS: it comes with over 59000 packages, precompiled software bundled up in a nice format for easy installation on your machine.
Not sure, but does removing the meta package and then running apt autoremove work?
Nope, that doesn't remove anything. 0 upgrading, installing, removing, or not upgrading.
What you can do is pretend to reinstall (--reinstall), download only (-d), for example for xfce4 meta package :
sudo apt-get -d install --reinstall xfce4
Then stop it after it shows you which packages it is about and copy and paste all the packages it mentions in a simple file (myfile) and execute that.
For Gnome it could be like this (leaving out a lot of packages to make the example fit on one line) :
sudo apt-get remove --purge baobab chrome-gnome-shell folks-common fonts-cantarell gdm3
As you can see do note which display manager you're currently using. Executing the file you made can be done with :
bash ./myfile
On Debian Stable by default when apt installs a package it will also install Depends and Recommends. The package can't install without Depends so that one is obvious - for Recommends you can check your apt configuration running apt-config dump, it probably has
APT::Install-Recommends "1";
meaning those packages get installed too.
Knowing that, you could in theory run apt show PACKAGE-NAME to view each package's Depends and Recommends. So for example if you want to look at kde-standard then run
apt show kde-standard
With the above example you could use the information for Depends and Recommends to figure out which packages were installed alongside kde-standard. It would be a bit time consuming but could give you a starting off point.
Also note Debian repos are online on their website. So using the above example for Debian Stable you can view the same kde-standard info at https://packages.debian.org/stable/kde-standard , one idea could be simply to copy all the dep and rec package names and then paste them into a new script to apt remove them all one-by-one (or in one long command).
PS - I'm a bit surprised apt autoremove doesn't fix this for you, that seems to be the point of the command unless I misunderstood its intent :/