With Nidec CT EtherCAT drives you must set AXIS_ENABLE to 0 after the STO and then set it to 1 when the STO is removed. This type of sequence is different for different drives so it's not possible to say that you must do it for all drives with STO.
Check DRIVE_STATUS.6 and when it goes to 1, set the AXIS_ENABLE to 0. We don't have any advice for how to detect that the STO state allows the enable to be 1 again. Some drives set a Manufacturer specific bit to show the STO state.