Constraining the contribution of Gamma-Ray Bursts to the high-energy diffuse neutrino flux with 10 yr of ANTARES data