Infection outcomes depend on within-host spatial dynamics