Enhancing the performance of superconducting nanowire-based detectors with high-filling factor by using variable thickness