Enhancing generalization in high energy physics using white-box adversarial attacks