There are a few things I can assume that might have gone wrong here. But mcferaligatr has really covered most of it.
Let's get the easy thing out of the way: variable 0x5007 is not safe, unless you are using CFRU. Try using one of the variables mentioned here:
List of safe Vars and Flags
But mcferaligatr has already said this in short. 0x4011 - 0x40FF are safe to use.
Now, there is already a level script in Pallet Town that uses the movesprite2 command to move NPCs around. And I dont think FireRed ROM likes it when there are two level script of the same type in the same map. What you can do is either remove all the other existing scripts like mcferaligatr said (if you think the other level scripts are not important to be there) or merge your script with the existing one (if you think the other level scripts are important to be there). A script like:
The parts in the bold are your script and the rest is the default Pallet Town script. Compile it and replace the existing Level Script Type 03.
Another thing you need to remember is that Pallet Town has multiple types of Level Scripts, if you removed all of them for your own level script, then its fine. But if you decided to keep multiple types of level scripts, make sure you add/keep them in this order: Type 1 > Type 7 > Type 5 > Type 3 > Type 4 > Type 2 (Source:
this video)
You can see this in Oak's Lab map. Type 3 script is script no. 0, Type 4 is script no. 1 and Type 2 is script no. 2.
Another thing I have noticed about movesprite2 command is that, the variable or the flag that you are using to condition of whether to the move the sprite MUST BE MANIPULATED OUTSIDE THE MAP. But I think you are okay in this regard, since you said 0x5007 becomes 0x1 when receiving the starter that takes place inside Oak's lab i.e. different map from Pallet Town's outside.
But if you are using something like, you get the starter and then you talk to the guards and they set 0x5007 to be equal to 0x1, then there might be a little problem and you might wanna rework some scripts.
That's all I got and sure, PM me in PokeCommunity, I'll give you my Discord ID if you want to get added xD