Regular M5x10mm bolts are too long for the rear hub/motor assembly, the spindle stops spinning way before the bolt bottoms out.
I had my wheel replaced by Specialized (bad torque sensor) and after stripping a bolt on the original wheel when swapping them out I left the rotor and the bolts on...