That would only make the batter automatically out and not the runner. Infield fly rule is meant to avoid the infielder purposely dropping a fly in order to get more than the batter out.
Couldn’t happen in that situation anyway. Infield fly rule only applies when there is a fly in the infield and a force at third (at minimum.)