So, the question is whether it uses less electricity to desalinate and flood irrigate, or pay for the electricity to allow ultra high density, water efficient farms, and then desalinate less.
(I’d be shocked if either of these approaches is pareto-optimal.)
Nobody desalinates & floods fields, surely. (That's what you do if you live before the invention of water-pipe, or have a use-it-or-lose-it quota.) The Israelis are I think world leaders in growing stuff outdoors with minimal water, delivered directly to the roots. And indoors, they have greenhouses, just not the same design as in cold climates obviously.
You could probably recover some of the water from the exhaust air with a dehumidifier. I'm not sure if that would use less power than air-conditioning the whole structure, but at that point you're pretty much back to indoors farming anyway.
Water can be recuperated with an enthalpy wheel.