  All disc-accreting astrophysical objects produce powerful outflows. In
binaries containing neutron stars (NS) or black holes, accretion often takes
place during violent outbursts. The main disc wind signatures during these
eruptions are blue-shifted X-ray absorption lines, which are preferentially
seen in disc-dominated "soft states". By contrast,optical wind-formed lines
have recently been detected in "hard states", when a hot corona dominates the
luminosity. The relationship between these signatures is unknown, and no
erupting system has revealed wind-formed lines between the X-ray and optical
bands yet, despite the many strong resonance transitions in this ultraviolet
(UV) region. Here, we show that the transient NS binary Swift J1858.6-0814
exhibits wind-formed, blue-shifted absorption associated with C IV, N V and He
II in time-resolved UV spectroscopy during a luminous hard state. This
represents the first evidence for a warm, moderately ionized outflow component
in this state. Simultaneously observed optical lines also display transient
blue-shifted absorption. Decomposing the UV data into constant and variable
components, the blue-shifted absorption is associated with the former. This
implies that the outflow is not connect to the luminous flares in the data. The
joint presence of UV and optical wind features reveals a multi-phase and/or
stratified outflow from the outer disc. This type of persistent mass loss
across all accretion states has been predicted by radiation-hydrodynamic
simulations and helps to explain the shorter-than-expected outbursts duration.
