The easy way to determine if a package is installed by the Ubuntu Desktop Installer is to check if it's included in the ubuntu-desktop metapackage. That's the metapackage that defines what the installer will install:
You can see the list of immediate dependencies using the command: apt depends ubuntu-desktop.
But what if your package is not listed among the immediate dependencies? You can easily find out by testing the package with apt.
For example, let's simulate the removal of nautilus (the Gnome file manager). We will, of course, use the --simulate flag; there is no need to destroy our system to answer this simple question. You can see below that removing nautilus also results in the removal of ubuntu-desktop. This is conclusive proof that nautilus is installed by the Desktop Ubuntu installer:
$ apt remove nautilus --simulate
NOTE: This is only a simulation!
[...]
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gnome-shell-extension-desktop-icons nautilus nautilus-share ubuntu-desktop
ubuntu-desktop-minimal
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Remv ubuntu-desktop [1.440]
Remv ubuntu-desktop-minimal [1.440]
Remv gnome-shell-extension-desktop-icons [19.10.2-1]
Remv nautilus-share [0.7.3-2ubuntu3]
Remv nautilus [1:3.34.1-1ubuntu1]
Let's expand on that example in two ways. Let's move down the dependency tree and try to remove a sub-dependency (nautilus-data). We do this by changing from remove to autoremove. Also, let's use grep to reduce the output. You can see below that this is an effective way to test any (sub-)dependency of ubuntu-desktop anywhere in the chain of dependencies. The nautilus-data package is installed by the Ubuntu Desktop Installer:
$ apt autoremove nautilus-data --simulate | grep ubuntu-desktop
session-shortcuts tree ubuntu-desktop ubuntu-desktop-minimal
Remv ubuntu-desktop [1.440]
Remv ubuntu-desktop-minimal [1.440]
Let's look at the case with the opposite result. chrome is NOT a dependency of ubuntu-desktop. It was installed sometime later. Removing it WON'T remove ubuntu-desktop:
$ apt autoremove chrome --simulate | grep ubuntu-desktop
(No output)