It's not
None of Alolan (or regular) Grimer's abilities indicate that it's immune to Leech Seed. As it's not Grass type, it is affected by Leech Seed. The only ability that won't let Leech Seed work is Magic Guard.
Therefore, if and only if your Alolan Grimer has Power of Alchemy as its ability and a Pokemon with Magic Guard in your team fainted before, it makes sense for that to happened.
But that's not as likely as this:
If you were hit by Leech Seed, but took down the foe the same turn, then there is no foe to drain the HP to, and so your HP doesn't go down. Simple as that.
Source: Personal experience.