Optimisation of the SHiP Beam Dump Facility with generative surrogate models