I am reading these notes on nearby and vanishing cycles, where an initial assumption is made: the author talks about a complex analytic function $f:X\to \mathbb C$, assuming $X$ is closed in an open subset $U\subset \mathbb C^N$ and $f$ it is the restriction of a function $\tilde f:U\to \mathbb C$. Then some statements are made regarding the cohomology of the Milnor fiber $F_{f,p}$ for $p\in f^{-1}(0)$. The function $\tilde f$ is never mentioned again. So I was wondering:

What is the relation between the sheaf of vanishing cycles $\phi_f$ (living over the singular locus of $X_0=f^{-1}(0)$) and $\phi_{\tilde f}$ (living over the singular locus of $U_0=\tilde f^{-1}(0)$)?

In particular I would like to understand under which assumptions one can conclude that $$\chi_{top}(F_{f,p})=\chi_{top}(F_{\tilde f,p}).$$

Even "stronger" question: Can we say that the reduced cohomologies $$ \mathcal H^i(\phi_f \underline{\mathbb Q}_X)_p\cong\tilde H^i(F_{f,p},\mathbb Q),\qquad \tilde H^i(F_{\tilde f,p},\mathbb Q)\cong\mathcal H^i(\phi_{\tilde f} \underline{\mathbb Q}_U)_p $$ agree?

Thank you for reading!