Massive stars steal their giant planets