Closure of a CFL under specific operation
You are right, regular languages are closed under inversion $\mathrm{inv}$, using some proper guesses, or see my answer to a relevant question here.

Context-free languages are not closed under $\mathrm{inv}$. Your intuition does not work. We cannot push $y$ on the stack because it will make the 'real' stack below it inaccessible for the simulation.

Here is a possible counter example. Consider $L = \{ a^nb^nc^md^m \mid m,n\ge 1 \}$. Then try $\mathrm{inv}(L) \cap a^*c^*b^*d^* $.