One way would be to install a Studor vent or a vacuum vent at the high point of the discharge inside the basement. Then when the pump shuts off the device will open and break the vacuum which will allow the last of the water to drain out of the pipe.