Ideally, the hot discharge from the compressor would loop around the bottom of the water heater tank. At the top of the tank, perhaps a high limit dump, so that if the tank got too hot, it would drain some hot water into the sewer. Or, perhaps, a diverter valve to divert the hot discharge gasses back to the condensor.
The challenge would be to get the water heater and AC companies to make their equipment compatible with each other.
Or, use a coaxial water cooled condensor, with the water going into the water heater.