As you correctly mentioned, the Schwarzschild (exterior) solution is valid only in the outside region of a massive object. However, the solution of Einstein field equations, the metric, constitues the whole space-time. Thus, in situation you describe, there is always an interior region of the space-time. The space-time is curved due to energy density and pressure contained there. In the simplest case the interior metric is given by so-called interior Schwarzschild solution. Because, I assume, you speak about a black hole, we must see what happens when the central pressure of the interior solution growths unbounded. The established conclusion is that the static interior and exterior space-time regions become transient, i.e. the object collapses, and thereafter two physically decoupled space-time regions remain: the static exterior, your Schwarzschild vacuum solution, and the transient vacuum interior due to space to time conversion. Because in the whole process the total mass (energy density) has not been changed, the space-time remains curved. Where is this energy located is an open question. I think it is the static external space-time. These two papers [1,2] seem to show that.
[1] D. Lynden-Bell and J. Katz, “Gravitational field energy density for spheres and black holes”, https://articles.adsabs.harvard.edu/pdf/1985MNRAS.213P..21L
[2] Aharon Davidson and Ilya Gurwich, “Hollography Driven Holography: Black hole with vanishing volume interior”
https://arxiv.org/abs/1007.1170