The fish can adapt if the salinity is changed slowly enough. So, many fish species today have the capacity to adapt to both fresh and salt water within their own lifetimes. Aquatic air-breathing mammals such as whales and dolphins would have been better placed than many fish to survive the flood because of the turbidity of the water, changes in temperature, etc. The fossil record testifies to the massive destruction of marine life, with marine creatures accounting for 95 percent of the fossil record. There is also a possibility that stable fresh and saltwater layers developed and persisted in some parts of the ocean.
Fresh water can sit on top of salt water for extended periods of time.
Turbulence may have been sufficiently low at high latitudes for such layering to persist and allow the survival of both freshwater and saltwater species in those areas. There are many simple, plausible explanations for how fresh and saltwater fish could have survived the flood. There is no reason to doubt the reality of the flood as described in the Bible. There is a huge number of marine fossils. But they are conspicuous by their absence.