Any sonar useful enough to navigate at speed is going to give away your position.
It's the "flashlight in the dark room" problem. Your sonar ping has to travel to an object and reflect back to the submarine. But an adversary just needs to hear the original ping to know what direction it came from, so you can be detected at a longer distance, and potentially a much longer distance, than you could reliably detect the other submarine at.
That's not to say active sonar is never used, but at least with the U.S. it's not going to be continuously used, and it's going to be rare to use it if you're in a mission area.
A sonar transducer that can emit a ping with directionality is sometimes useful (e.g. a fathometer to measure depth to the ocean bottom, since the crushing pressure of the depths ensures the area below you is generally clear of enemy subs), and those are used. But even there, that wouldn't be useful for navigating when otherwise blind; you use fathometers to confirm that you're approximately in the area you think you're in based on the chart readings.