Hey, thank you for the feedback! :)
I have tried reducing the content in some objectives in order to take that into account, but this is a good reminder to keep that perspective in mind in the future as well.
The reason that the objective window stays even after uninstalling, is that the objective is Factorio's native feature. From a technical point of view, this mod only changes the content of the objective box when the game begins, or the resources are gathered.
One way to hide the objective window is by running the following command in-game. However, this is unideal, since it disables achievements.
/c game.player.set_goal_description("")
I'm not sure if it's possible to run code during the uninstallation of a mod. There seems to be a script.on_configuration_changed
event, but on a quick glance, I think that is only run for mods that remain after uninstalling another mod.