One update. So I was able to almost do what I wanna do here. Since I can get the instanced meshes I can get their materials. So by comparing the materials I can find out which object is just a type of grass or a tree, rock etc. and only delete the ones I want. However I have to update the list of possible materials whenever I wanna add something new to my Foliage Spawner.
If I could find out which material type something uses this would be much easier, since I could make all the grass be a child of the same material type or something like that.