This seems to misunderstand what "genocide" is.
It's not "killing a lot of some type of being". It's "attempting, specifically, to wipe out a specific kind of being". Blowing up a ship with a lot of aliens on it because it was your only way to defend yourself, and their intentions were known and very bad is pretty much never going to be genocide, because your goal isn't, well, genocide.
Successfully defending the planet, then flying back to THEIR planet and finishing off any remaining ones, or if their entire population was on the ship, pursuing it and ensuring it was destroyed, the first would definitely be genocide and the second might well be.