nice game!
could be because of the code, but the game is rather laggy though. have you tried using the local radius mod? (i don't remember the exact name but it allows rules to only be carried out in a certain area, which may help with this)
Can you try it on PuzzleScript Next (which does support local radius)? https://puzzlescriptnext.polyomino.com/