There was a problem with MPU-6050 modules which had the wrong WHO_AM_I value:
https://forum.arduino.cc/t/mpu-6050-a-module-problems-who-am-i-reports-0x98-not-0x68-as-it-should-fake-mpu-6050/861956.
Could you run that sketch at reply 10 ? It prints the WHO_AM_I register.
It is possible that the I2C bus can barely accept a I2C Scanner, but fails when real data is transferred. If your WHO_AM_I is okay, then we can look into this.