This is a glitch where the costumes switch to one and another, and the code doesn't focus on the size, but still runs the script.
Thanks to Professor Blue on Youtube.