Firestrike Hello! When an on hit script is assigned to a weapon, the projectile will not be removed automatically. This is intentional so that you can trigger custom events around it, for example playing an animation for the projectile. To remove it in your on hit script, you'd use the "Remove Entity" function:
remove_entity($projectile);
Here are the details from the release notes in case any of the other variables are useful to know:
Added "On Hit Script" option for weapon items ($weapon will contain the weapon item's codex, $target the hit entity, $damage the damage amount, and $projectile the projectile entity)