A sustained ability needs to be maintained throughout its duration. If a creature becomes incapable of an ability they're sustaining or otherwise loses the ability then the effects of that ability end.