Did you get chance to look at below Wiki article which will help you understand the active and inactive accounts and identities and how to set it through rule, you will find best practices.
@cleber_pcarv In the web service connector, you do not need to write a customization rule to set the account’s disabled and enabled status. SailPoint IdentityIQ provides a configured attribute, you just need to configure the value to set the Schema Attribute for Account Enable status : enabled=true or false
@cleber_pcarv Try to use the configuration as much as possible as this reduce the complexity on your implementation. In your usecase, try to utilize the options available in connector configuration. In most of the cases, it is very much working as expected. So please try it out.
If you want to stick to the rule, you might want to share your original rule (seems you shared a simplified version, could be possible that in your original rule, we have something extra) and the logs for further review.
Note: Found a fix? Help the community by marking the comment as solution. Feel free to react(, , etc.) with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.