Zend certified PHP/Magento developer

Store credit issue with refund: M2 EE

When the customer places an order he received the store credit amount and that amount is shown in-store credit balance.

But when I refund the order for that customer at that time store credit amount should be removed from the store credit balance.

Instead of removing that amount again, the same amount is added in-store credit balance while refunding the order.

Not found any issue in the logs.

Thanks.