@Divyesh I have also noticed this problem multiple times. This is simlar to the issue mentioned here.
RMS / OMS isn’t in the short interval cognizant of the long leg being executed and hence not providing the required hedge margin benefit. So the short leg fails. It however goes through if directly placed after the failure indicating that we had the required margin already.