What could make submarines obsolete?
Short answerTrue ocean transparency that eliminates underwater concealment, though that is not expected within roughly forty to fifty years without a breakthrough.
NotesA submarine gives up much of a surface ship's capacity for active defenses in exchange for concealment. If underwater hiding became reliably impossible, that exchange would cease to make sense. Such transparency is not expected without a major technological breakthrough and is placed beyond the next several decades.