In SA:MP, the phenomenon or player that last damaged you before you typed /kill will get the credit for your death. For example, if you type /kill after you fell off a building, it will count as death by fall damage. If someone has shot you, and you type /kill afterwards, the credit of your death will go to that player. Godmode/spawnprotection or not. (Real godmode doesn't exist in SA:MP, the godmode/spawnprotection you know just makes sure your HP doesn't get to 0)
This is simply the way SA:MP was scripted, it's not really a bug and it doesn't have anything to do with the anti death evasion