update:
We moved the robot with the manual brake release button pressed on the external axis, it allowed us to do so. When you release the brake button, error 38031 appears again.
Apparently the brake release system on the external axle motor is failing.
Are there any parameters to check in the teach pendant? something that could have been changed by mistake and for this reason the brake does not release?