Evaluating and Improving the Robustness of Security Attack Detectors Generated by LLMs