As you've discovered RunDialog commands aren't actually executed until the end of the script (why, I have no idea, but someone else can probably tell you*). You need to split your commands across 2 run scripts - one containing anim 1 and the RunDialog and the second containing anim2.
* Possibly this page.
* Possibly this page.