In addition to being free-power-turbines, the engines are connected to the gearbox by freewheel units which disengages when rotor speed exceeds engine speed (taking into account the reduction of gearbox(es) obviously).
Like going downhill on a push bike if you like, the pedals don't turn but the wheels do.