yep theres a time span that initiates once you or someone else gets hit by enemy fire, that can make a betrayal or a suicide their kill, but if that person dies before that time is up, and you throw a grenade at your teamate, its an automatic betrayal, but the game reads betrayals different and in ways can detect if the grenade was intentional or not just by its direct path, if it was intentional which you say it was, thats probly why.
Just like in VIP matches where the other team can be shooting you when your team has no VIP on the in between of yours getting killed,
if you kill yourself, you do not become the vip, even if the other team is shooting you. because the game recognizes it as being intentional so you could become the vip, just doesnt work that way.
It takes very minimal damage, even just one shot, for the game to register the kill with your name so in a situation like the magic grenade, it would become the magic grenade throwers kill.