I'm not sure that this is the best solution but I went ahead and came up with a ghetto fix I suppose, it does require SkStuff for nbt but I see you have it, I haven't tested it but I have a variation of this on my server so I'm pretty sure it works as I only changed a few things, also I did get a little confused as to what it is you want after reading the rest of your posts but assuming you still want what you wrote in the original post the following should be a solution
code_language.skript:
function despawnentity(e: entity):
add "{NoDrops:1}" to nbt of {_e}
teleport {_e} 1000 blocks above {_e}
wait 1 tick
kill {_e}
On death:
if tag "NoDrops" of nbt of victim is 1:
clear drops
EDIT:
I've tested it using the following code and it works like a charm:
code_language.skript:
on right click on entity:
despawnentity(clicked entity)
Edit 2:
Oh gawd, something is wrong, after some more testing I found out the drops are not being cleared, this must be something to do with the nbt aspect of the code, looking into it...
Edit 3:
Okay I think the problem is that you can't add custom nbt to an entity, I know SkStuff has something to add custom nbt to an item so I just figured it would work on an entity too but I guess not, the reason the variation of code I use on my server works is because I'm not adding custom nbt to the entity instead I add "{CustomNameVisible:1}" to nbt of entity which is a real nbt tag, what that tag does is so that an animal's name will show above its head regardless of whether you're looking at it or not, here is the updated code with that tag
code_language.skript:
function despawnentity(e: entity):
teleport {_e} 1000 blocks above {_e}
add "{CustomNameVisible:1}" to nbt of {_e}
wait 1 tick
kill {_e}
On death:
if tag "CustomNameVisible" of nbt of victim is 1:
clear drops