I confirm that changing the name of the .desktop file to Mailspring.desktop fixes the issue on Ubuntu 20.10. However, this only works for the .deb version of Mailspring and not for the snap version.
I will need to debug the issue for the snap further.
This PR will change the name of the .desktop file, so that the icon badge is placed correctly (when installing the .deb package). Not tested with the snap package yet, as I was unable to build the snap package correctly so far.