I don't think they ever will be completely obsolete, the paradigm will probably just shift away from big formations of big boats with big guns to smaller more maneuverable boats in smaller groups more specialized on long distance strike capabilities using drones and missiles.
US Navy impotently flailing against Ansarallah. Russian Navy getting owned by drone boats. Chinese hypersonic anti ship missiles. Are navies obsolete?
I don't think they ever will be completely obsolete, the paradigm will probably just shift away from big formations of big boats with big guns to smaller more maneuverable boats in smaller groups more specialized on long distance strike capabilities using drones and missiles.