This scenario is covered in the Known Limitations documentation.
When a user is disabled in Microsoft Entra, the provisioning service will send a disable request to the target application. At that point, the user is not managed by the service and we will not send a delete request when they are deleted from the directory. When a user goes from soft-deleted to active, the Entra provisioning service will activate the user in the target app, but will not automatically restore the group memberships. The target application should maintain the group memberships for the user in inactive state. If the target application does not support this, you can restart provisioning to update the group memberships. The user must be active in Microsoft Entra ID before they're provisioned.
https://learn.microsoft.com/en-us/entra/identity/app-provisioning/provision-on-demand?pivots=app-provisioning https://learn.microsoft.com/en-us/entra/identity/app-provisioning/customize-application-attributes
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar questions.