You're most likely getting disconnected due to a long running cmdlet, and the amount of data returned. We've spoken at length about how to optimize PowerShell for such scenarios, look up the webinar recordings if you are interested. For the short version, use the approach detailed here: https://github.com/Canthv0/RobustCloudCommand
Well it seems our marketing folks removed them with the move to our new platform... sorry. The module above covers almost everything we discussed there, give it a try.
I have checked module you provided and see there a necessarry parameter -recipients, but it is not applicable for my case. I just need to collect all unified groups, I don't want to do any actions on them.