Some frogs, like Crab-eating frogs, can indeed live in salty water. However, as you point out, a majority of frogs cannot dwell in salty water because of the ion/salt concentration in those water bodies is much more (hypertonic) than in the frogs bodies, therefore if frogs tried dwelling in such waters they would loose water to the water bodies becoming dehydrated. Crab-eating frogs differ with other frogs in that they don’t excrete urea but store up urea hence raising their ionic concentration which allows them to safely dwell in salty water.
Most frogs can’t live in salty water. Osmolality is a measure of how much one substance has dissolved in another substance. The blood and cells of frogs has a lower osmolality than that saltwater. This will lead to water moving out of their body(via osmosis) causing dehydration which leads to death.
The crab-eating frog is the only frog that can survive in salty water. Its kidneys have evolved to produce a lot of urea. This urea makes up a disproportionately high percentage of the frog’s bodily fluids, allowing it to retain osmotic equilibrium/balance with a saltwater environment. Therefore water can not move out of their bodies. Without it, they would easily dehydrate from the salt.