The battle against the Starly is coded for the player to always win, as when the player's Pokémon gets low on HP, the Starly will flee.
Source