Hello @nileshnikalje
This is a known issue. Sailpoint has the fix behind a feature flag but not able to roll out as it will break customers who have build workarounds around this. They can enable selectively for any customer willing to take the change , raise a ticket for this .
Workaround it to compare the length of the array and , follow 2 different branches .