Ultracold bosonic scattering dynamics off a repulsive barrier: Coherence loss at the dimensional crossover