Hi @Sumit
I can reproduce your issue, when we use transitiveMemberOf with $expand, the result is not returning transitive/nested groups. Not sure if this is an unknown bug, I recommend that you submit a user voice to feedback the issue to Microsoft.
For now, as an alternative solution, you can try JSON batching, which allows you to combine multiple independent requests into a single HTTP call to save network latency.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.