My datapack is acting weird...

Hi. As the title says, my datapack is acting weird because of the addition of the three commands shown below into my load.mcfunction file.

summon minecraft:chicken 0 -60 0 {CustomName:"{\"text\":\"Marker\"}",NoAI:1b}
spreadplayers 0 0 5 10 false @e[name="Marker",limit=1]

(in case you're wondering why the y-coordinate is -60, this is done on a superflat world)

As you can see, upon loading 2 chickens are summoned at 0,0. Then, the "spreadplayers" command is used to move one of them to a random location 5-10 blocks away from the other, while the other stays still (this effectively moves one of the chickens 5-10 blocks away from 0,0). Because there are three commands, you would expect this process to take 3 ticks to complete, but it takes 2 WHOLE MINUTES and sometimes doesn't even work, spawning only 1 chicken instead of 2 about 20-30% of the time. When I add this command:

kill @e[name="Marker"]

it mostly fixes the previous commands (they successfully execute with the speed i'd expect them to) but they still occasionally spawn only one chicken. Whether or not the 4th command is added, all other commands in my datapack function normally, and my PC has a decent-ish CPU and 12GB of RAM assigned to minecraft so poor PC performance isn't what's causing this. Why is this happening?

(I am using these commands so that in the future i can modify them a bit and use them to randomly determine a location to place a custom structure i've made)

Continue to help post