I am creating a mod that has an entity, this entity starts with a scoreboard called pinata_test_appeae set to 0, the entity detects how many dirt blocks are around it, if it has 30 dirt blocks or more it executes a command that sets the scoreboard pinata_test_appear to 1, when pinata_test_appear is at 1 it spawns an entity, in this entity when it is spawned it executes a command that sets the pinata_test_appeae scoreboard to 2, I did this to avoid more than one entity being spawned. everything was working fine but when i went to test a new version, and for some reason it doesn't work anymore the entity is summoned but the scoreboard is not set to 2 and when i used setdisplay scoreboard i noticed that the pinata_test_appeae scoreboard was not changing and it was always at zero (scoreboard was changing in old versions)
execute as @s if score @s pinata_test_appear matches 0 run execute as @e[type=test:arc] if score @s dirt matches 30.. run scoreboard players set @e[type=test:req] pinata_req1 1
execute if entity @s[scores={pinata_req1=1}] run scoreboard players set @s pinata_test_appear 1
execute as @s if score @s pinata_test_appear matches 1 run summon test:pinata_test 10 -60 0```
test:arc is the entity that detects dirt blocks
test:req is the entity that executes the commands mentioned above
test:pinata_test is the summoned entity
```scoreboard players set @e[type=test:req] pinata_test_appear 2```
^ This is the command pinata_test runs when it spawns
As you can see in the image, the entity does not stop being summoned

