In the setting of complex Stein manifolds $X$ of complex dimension $d$, the theorem of Andreotti--Frankel implies the vanishing of the singular cohomology group $H^i(X,\mathbb Z)=0$ for $i>d$. With complex coefficients, a simple argument for this is to compute the cohomology in terms of the cohomology of the de Rham complex. Their theorem gives a more precise Morse-theoretic statement.
Now let $U\subset X$ be another Stein manifold open in $X$, and assume that the map $\mathcal O(X)\to \mathcal O(U)$ has dense image. (This condition is not automatic, and necessary for the following.)
Conjecture. In top degree, the map $H^d(X,\mathbb Z)\to H^d(U,\mathbb Z)$ is surjective.
Is this known? The same result should also be true with constructible coefficients. With $\mathbb C$-coefficients, it follows from the comparison with de Rham cohomology (at least when cohomology groups are finite-dimensional, which I'm happy to assume). Is there some argument using Morse theory?
The motivation for the question is that the analogue in rigid-analytic geometry is true (but I found it quite surprising); it is essentially equivalent to a version of Artin vanishing for affine schemes over absolutely integrally closed valuation rings stated by Gabber in Oberwolfach last year.