Bragg scattering of an ultracold dipolar gas across the phase transition from Bose-Einstein condensate to supersolid in the free-particle regime