Hi,
CRM transaction will be triggered for replication if the correct system status is set.
When we set the user status manually, system will automatically sets the corresponding system statuses. So if your custom code to set user status is not setting the system status you need to write logic for it.
User status and System Status can be accessed at below path :
SPRO » IMG » CRM » Transaction » Basic Settings » Status Management » Define status profile for user status
System Status t-code BS33.
Regards,
Amrit