Enchantment effects activated on "minecraft:projectile_spawned"
always trigger from the block 0, 0, 0 and not the position of the entity with the enchantment or the projectile spawned
How to reproduce
Create a world with the attached datapack
Hold a bow or crossbow and run
/enchant @s rennen:bug_enchant
Fire the bow/crossbow
Head to 0, 0, 0 and notice that the gold disc spawned there
From my testing, this applies to "minecraft:replace_disc"
, "minecraft:explode"
enchantment effects, and likely others such as "minecraft:spawn_particles"
Can confirm.