Tensor equations are supposed to stay invariant in form wrt coordinate transformations where the metric is preserved. It is important to take note of the fact that invariance in form of the tensor equations is consistent with the fact that the individual components of the tensor may change on passing from one frame to another.[Incidentally,Preservation of the metric implies preservation of norm, angles etc.]
But in General Relativity the tensor equations (examples: the geodesic equation, Maxwell's equations in covariant form) are considered to be invariant in form when we pass from one manifold to another. The metric is not preserved in such situations. Preservation of the value of the line element is consistent with the fact that $g_{\mu\nu}$ may be considered as a covariant tensor of second rank:
$ds'^2=ds^2$
${=>}g'_{\mu\nu}dx'^{\mu}dx'^{\nu}=g_{\alpha\beta}dx^{\alpha}dx^{\beta}$
${=>}g'_{\mu\nu}=g_{\alpha\beta}\frac{dx^{\alpha}}{dx'^{\mu}}\frac{dx^{\beta}}{dx'^{\nu}}$
Rigorous Calculations:
$ds'^2=g'_{\mu\nu}dx'^\alpha dx'^\beta$
$=g'_{\mu\nu}\frac{\partial x'^\mu}{\partial x^\alpha}{d x^\alpha}\frac{\partial x'^\nu}{\partial x^\beta}{d x^\beta}$
$=g'_{\mu\nu}\frac{\partial x'^\mu}{\partial x^\alpha}\frac{\partial x'^\nu}{\partial x^\beta}{d x^\alpha}{d x^\beta}$
$=>g_{\alpha\beta}=\frac{\partial x'^\mu}{\partial x^\alpha}\frac{\partial x'^\nu}{\partial x^\beta}g'_{\mu\nu}$
Therefore $g_{\mu\nu}$ is a covariant tensor of rank two.
But in the above proof we have assumed the value of $ds^2$ as invariant wrt to our transformation.This not true when different types of manifolds are in consideration.
Non-conservation of the value of $ds^2$ will result in dismissing $g_{\mu\nu}$ as a second rank tensor of covariant type. This will be the situation if we pass from one manifold to another.*It is important to emphasize the fact that the problem will remain even if when we pass from an arbitrary manifold to flat spacetime in particular to the local inertial frame.*Differential considerations are not improving matters as indicated in the above calculation. The very concept of a tensor gets upset by considering different/distinct manifold.
What is the mathematical foundation for the invariance of form of the tensor equations in such applications where we consider different/distinct manifolds?