Runaway stellar collisions in dense star clusters are invoked to explain the presence of very massive stars or blue stragglers in the center of those systems. This process has also been explored for the first star clusters in the Universe and shown to yield stars that may collapse at some points into an intermediate mass black hole. Although the early evolution of star clusters requires the explicit modeling of the gas out of which the stars form, these calculations would be extremely time-consuming and often the effects of the gas can be accurately treated by including a background potential to account for the extra gravitational force. We apply this approximation to model the early evolution of the first dense star clusters formed in the Universe by performing $N$-body simulations, our goal is to understand how the additional gravitational force affects the growth of a very massive star through stellar mergers in the central parts of the star cluster. Our results show that the background potential increases the velocities of the stars, causing an overall delay in the evolution of the clusters and in the runaway growth of a massive star at the center. The population of binary stars is lower due to the increased kinetic energy of the stars, initially reducing the number of stellar collisions, and we show that relaxation processes are also affected. Despite these effects, the external potential enhances the mass of the merger product by a factor $sim$2 if the collisions are maintained for long times.