https://www.amusingplanet.com/2016/09/this-wooden-barrel-was...
Not really. Subs don’t move that fast in those tight of conditions. One wrong move and the sub bumps the canyon wall making a bunch of noise. Unless they are in actively hostile waters, it just means loss of stealth and the sub needs to choose a new location to lurk.
"On 8 January 2005 at 02:43 GMT, San Francisco collided with an undersea mountain about 364 nautical miles (675 km) southeast of Guam while operating at flank (maximum) speed at a depth of 525 feet (160 m)."
From the same article:
“The collision was so serious that the vessel was almost lost; accounts detail a desperate struggle for positive buoyancy to surface after the forward ballast tanks were ruptured.”
I doubt these are problems any submarine crew wants to deal with, even at slow speeds. Besides, one sharp edge at the sides will open her right up like a tin can.
They are meant for warfare and surviving torpedo concussions as much as possible, so depending on speed, a slow scrape with terrain might not be fatal.