If it is gyro drift, it is often related to the temperature of the IMU package. Some IMU’s are more sensitive than others to temperature variation. Can you preform a “PREFLIGHT_CALIBRATION” using the Mission Planner actions menu the next time the error occurs? This will re-calibrate the gyros to zero, just as happens during the boot process.
If the IMUs are unusually temperature sensitive there are a few options. One would be to replace the flight controller for another one that is not as sensitive. Another option, if the flight controller has an IMU heater like a Cube flight controller, you can preheat the IMU package by powering on a few minutes before flight. Then preform the preflight_calibration action or a reboot once it has reached operating temperature. If it does not have a heater you could try adding some amount of insulation to the flight controller compartment to reduce the temperature changes during flight caused by the airflow.
If you can provide a dataflash log of the event with log_disarmed enabled that could help identify the problem.