It always has a loop running DW1000Ranging.loop();
That makes it always looking to receive the signal, and it still draws 160mA. If it is in sleep mode, the module consumes 3.5 mA.
How do I activate sleep mode? Any solution?
I want to do it when I press a button, for example:
I would try the funtion named deepSleep and see if it works. The DW1000 datasheet or related docs may include power management advice when running on battery.
If using ESP32, search for "deepsleep esp32". There is no shortage of information about ESP32.