Motor noise interfering with I2C
EMI problems are frequent in such design and there is no a common medicine for that. One thing that must be done is gnd separation- only connect them near the power supply. Another- best possible filtering on motor drive supply. Each mesh with high current, including gate driving circuit, must be as short as possible. Maybe resistors on gates will help. Put ferrite ring on motor cable near the driver. Use buffers for i2c. Good luck!