The simple solution is to always move the z axis up at the start of homing to clear the bed. Something like 5 or 10 mm.
The better solution would be to check the status of the probe and only move up if the probe is trigger. The could be accomplished through conditional statements.