Make sanitization script work more resiliently with less error conditions

2 jobs for sanitize_hepmc3_resilience in 49 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
passed compile #412929

00:00:33

 
  Test
passed test_npsim #412930

00:00:15