A Border Force officer has lost an unfair dismissal case after he was sacked for using a company car to make a detour to see his dying father.