1: \begin{abstract}
2: Dark sirens, i.e., gravitational-wave (GW) sources without electromagnetic
3: counterparts, are new probes of the expansion of the universe.
4: The efficacy of this method relies on correctly localizing the host galaxies.
5: However, recent theoretical studies have shown that astrophysical environments
6: could mislead the spatial localization by distorting the GW signals.
7: It is unclear whether and to what degree the incorrect
8: spatial localizations of dark sirens would impair the accuracy of the measurement of the cosmological
9: parameters. To address this issue, we consider the future observations
10: of dark sirens using the Cosmic Explore and the Einstein Telescope, and we
11: design a Bayesian framework to access the precision of measuring the Hubble-Lema\^itre constant $H_0$. Interestingly, we find that the precision is not compromised when the number of well-localized dark sirens is significantly below $300$, even in the extreme
12: scenario that all the dark sirens are localized incorrectly.
13: As the number exceeds $300$, the incorrect spatial localizations start to produce
14: statistically noticeable effects, such as a slow convergence of the posterior
15: distribution of $H_0$.
16: We propose several tests that can be used in future
17: observations to verify the spatial localizations of dark sirens.
18: Simulations of these tests suggest that incorrect spatial localizations
19: will dominate a systematic error of $H_0$ if as much as $10\%$
20: of a sample of $300$ well-localized dark sirens are affected by their environments.
21: Our results have important implications for the long-term goal of measuring
22: $H_0$ to a precision of $<1\%$ using dark sirens.
23: \end{abstract}
24: