Check that the bottom bracket lockrings are tight, otherwise the motor will shift about and bang on the bike frame. The motor unit naturally wants to twist under power, so those lockrings need to be tight.
Also, the fixing bracket that attaches to the motor unit, needs to have the side with the...