Why is metric determinant negative for Lorentzian metrics?

In Sean Carroll's GR book, the Lorentzian metric is defined as a metric $$g_{\mu\nu}$$ that when put in its canonical form,

$$g_{\mu\nu}=\text{diag}(-1,..,-1,+1,...,+1,0,...,0)$$ has no zeros and only a single minus.

It was also said that the metric determinant $$g$$ is always negative for a Lorentzian metric. I can see that this is true if the metric $$g_{\mu\nu}$$ is put into the canonical form as shown above. However, under an arbitrary coordinate transformation $$x\rightarrow x'$$, how can we be sure that the determinant $$g'$$ is still negative?

$$\tilde g_{\mu\nu}=g_{\alpha\beta}T^\alpha_\mu T^\beta_\nu$$
that is, each of the indices gets contracted with one transformation matrix $$T^\alpha_\beta=\frac{\partial \tilde x^\alpha}{\partial x^\beta}$$. So, for the determinant we get:
$$\det(\tilde g)=\det(g)\det(T)^2$$
As you can see, no matter the sign of $$\det(T)$$, it will vanish due to the square and thus the metric tensor will keep its determinant's sign after the coordinate transformation.