GY521 failing with long wire

4ft is 1.2m

Keep SDA away from SCL.
If you use twisted pair as DrDiettrich wrote, then combine SDA with GND and combine SCL with GND. Do not combine SDA with SCL in a twisted pair. If you use a flat ribbon cable, then do not put SDA next to SCL.

In theory, the maximum length of a cable can be calculated with its capacitance. In real life that is useless, because crosstalk between SDA and SCL is the main problem.

All devices have a 3.3V I2C bus and your ESP32 has a 3.3V I2C. You don't need a level shifter. The GY521 module has a voltage regulator. If you power that module with 3.3V, then the MPU-6050 get a lower voltage. Can you bypass that voltage regulator ?

Your MPU-6050 is probably fake. It is also old and outdated and noisy. Please buy a more up to date sensor.
The GY521 has pullup resistors that are often 4k7, but can be anything the manufacturer happens to have laying around. The 2k2 on your board is not so bad.

You have to determine the total pullup for SDA and SCL of all combined pullup resistors. It should not be lower than 1k. The maximum sink current (to make SDA or SCL low) is 3mA.