Just a thought - have you built the balancing robot using the MegaPi? This may be how your motors problem has originated.
I spent ages analysing how the balancing robot worked after having initial troubles in getting it to work correctly.
N.B. After turning the MegaPi board on for the first time, the robot started to move immediately without any instructions from the Makeblock app. - the MegaPi must already be programmed to respond to feedback from the gyro module - so in reality there is nothing that you can programme yourself and nothing for you to see on how gyro feedback is used to control the motors. I have no confirmation of this, but I suspect that the default programme for the self-balancing robot resides in the firmware for the MegaPi board (?).
The Arduino code ‘Firmware for Makeblock Electronic modules with Scratch’ (V0e.01.017) dated: 19/03/2020 contains nearly 3000 lines of Arduino ‘C’ code and some lines contain clear references to ‘BALANCED_MODE’ and ‘BALANCED_CAR’ with angle & speed data being written to and read from EPROM, and PID parameters for the encoder motors being set. There are 53 lines of code containing similar references to these including entries referring to ‘Relax angle’, ‘Natural balance angle’, ‘Balanced data’ etc.
The Gyro module connected plus encoder motors connected to ports 1 & 2 activates ‘BALANCED_MODE’. In any new model constructed after this (and using encoder motors connected to ports 1 and 2) the motors will both start to rotate as soon as the MegaPi board is powered-on - the board still thinks that ‘BALANCED_MODE’ has been invoked.
Connecting to the board by Bluetooth and running any new programme should revoke ‘BALANCED_MODE’, stop the motors and return MegaPi to ‘normal’.
Regarding this model, a recommendation from ‘tech-support’ via the Makeblock Forum suggests that battery power (nearly always, as it often is) may be a fundamental problem in the wheels not responding rapidly enough to gyro feedback.