Detecting topological invariants in chiral symmetric insulators via losses