Determinantal inequalities for diagonally signed matrices and an application to Gram-Cauchy matrices