Since there "SHOULD" be 12 inches of straight pipe before the cell, you have a little "play" in the PVC pipe. I usually take a piece of 2x4 and place under the pipe if is is laying flat on the ground. It will not prevent all the water from coming out but it will help. If the salt cell is suspended in air, then you can try and raise the filter side of the cell connection.
Another helpful hint. If you do have a cartridge filter, do not open the air relief port on the top. That allows air to come in the filter and then it is "pushed" out the path of less resistance. Which is the open piece of PVC pipe that was connected to your salt cell. However if your cartridge filter has a 90 degree PVC fittings close to the connection at the "exit" side of the filter. You can sometimes, loosen that connection and turn the pipe upward, so the connection of the salt cell is above water level, that will help prevent water loss too.