  The observations of high redshifts quasars at $z\gtrsim 6$ have revealed that
supermassive black holes (SMBHs) of mass $\sim 10^9\,\mathrm{M_{\odot}}$ were
already in place within the first $\sim$ Gyr after the Big Bang. Supermassive
stars (SMSs) with masses $10^{3-5}\,\mathrm{M_{\odot}}$ are potential seeds for
these observed SMBHs. A possible formation channel of these SMSs is the
interplay of gas accretion and runaway stellar collisions inside dense nuclear
star clusters (NSCs). However, mass loss due to stellar winds could be an
important limitation for the formation of the SMSs and affect the final mass.
In this paper, we study the effect of mass loss driven by stellar winds on the
formation and evolution of SMSs in dense NSCs using idealised N-body
simulations. Considering different accretion scenarios, we have studied the
effect of the mass loss rates over a wide range of metallicities
$Z_\ast=[.001-1]\mathrm{Z_{\odot}}$ and Eddington factors $f_{\rm
Edd}=L_\ast/L_{\mathrm{Edd}}=0.5,0.7,\,\&\, 0.9$. For a high accretion rate of
$10^{-4}\,\mathrm{M_{\odot}yr^{-1}}$, SMSs with masses $\gtrsim 10^3\MSun$
could be formed even in a high metallicity environment. For a lower accretion
rate of $10^{-5}\,\mathrm{M_{\odot}yr^{-1}}$, SMSs of masses $\sim
10^{3-4}\,\mathrm{M_{\odot}}$ can be formed for all adopted values of $Z_\ast$
and $f_{\rm Edd}$, except for $Z_\ast=\mathrm{Z_{\odot}}$ and $f_{\rm Edd}=0.7$
or 0.9. For Eddington accretion, SMSs of masses $\sim 10^3\,\mathrm{M_{\odot}}$
can be formed in low metallicity environments with $Z_\ast\lesssim
0.01\mathrm{Z_{\odot}}$. The most massive SMSs of masses $\sim
10^5\,\mathrm{M_{\odot}}$ can be formed for Bondi-Hoyle accretion in
environments with $Z_\ast \lesssim 0.5\mathrm{Z_{\odot}}$.
