I connect to ubuntu from macOS using Microsoft Remote Desktop.
When I suspend ubuntu (Power Off button -> Suspend) and wake it up, I can't RDP. RDP Shows following error:

Unable to connect
We couldn’t connect to the remote PC. Make sure the PC is turned on and connected to the network and that remote access is enabled.
Error code: 0x204

If I reboot Ubuntu then it connects fine.

So what is causing RDP to not connect when waking up from Suspend?
How to fix it?