Ok so... After breaking a beacon at the exact position of an armor stand I wanna replace item drop.

So basically: You mine the beacon block that is ~ ~ ~ compared to the armor stand I need to check for. It runs a function when that happens and I need to replace the dropped beacon item with this item: minecraft:wither_spawn_egg[minecraft:entity_data={id:"armor_stand",NoGravity:1b,NoAI:1b,Invisible:1b,Invulnerable:1b,Tags:["Revive_Beacon","New"],Marker:1b},minecraft:rarity="epic",minecraft:item_name="Revive Beacon",minecraft:item_model="minecraft:beacon"] Ik I'm dumb and I've tried my best but I cant even delete the dropped item. I tried to use: kill @e[type=item,name=beacon,distance=1,limit=1] But as expected it did not work... yeah... so I'd appriciate help.
Continue to help post