By “the theory” you mean general relativity, which is one of the most well-confirmed theories in all of physics. You can’t just come up with a slightly modified version of GR to accommodate weird observations; the Einstein field equation is a unique solution because of all the demands placed on any reasonable theory of gravity. If you assume:
Spacetime is flat in the absence of matter;
Spacetime curvature is linear with respect to the density of matter;
The standard principles of mathematics (eg, two matrices with different dimensions cannot be equal);
The laws of physics are invariant under coordinate transformations (no preferred coordinate system); and
Spacetime does not have an a priori curvature not affected by matter;
“As a result, the theory wasn’t scrapped;”
By “the theory” you mean general relativity, which is one of the most well-confirmed theories in all of physics. You can’t just come up with a slightly modified version of GR to accommodate weird observations; the Einstein field equation is a unique solution because of all the demands placed on any reasonable theory of gravity. If you assume:
Spacetime is flat in the absence of matter;
Spacetime curvature is linear with respect to the density of matter;
The standard principles of mathematics (eg, two matrices with different dimensions cannot be equal);
The laws of physics are invariant under coordinate transformations (no preferred coordinate system); and
Spacetime does not have an a priori curvature not affected by matter;
you are forced to use general relativity.