The cause of USS Scorpion’s sinking is unknown so it may be related to the reactor or it may not.
If you read the page about USS Thresher then it clearly explains it had nothing to do with the reactor and was a "high-pressure water spraying from a broken pipe joint may have shorted out one of the many electrical panels, causing a shutdown ("scram") of the reactor, which in turn caused loss of propulsion" followed by other personnel and procedure issues that led to a sinking.
[1] https://www.nextbigfuture.com/2011/03/deaths-per-twh-by-ener...