I created a new Ubuntu Virtual Machine based using the image from Microsoft Hyper-V gallery on my Windows 10 laptop.
The tool used was "Hyper-V Quick Create" just as per instructions on this link.
I was able to successfully create the virtual machine and it started working well - no changes from my end. I use the Hyper-V virtual machine console to work.
Problems started when I used the "Software Updater" graphical tool in the Ubuntu virtual machine. After the updates the software prompted for a restart, which I did.
After that the gnome windows started behaving weird. The windows paint sluggishly just as the user shows in this post.
But unlike that user I am not able to show screenshots because every time I take a screenshot or hit PrtScr all windows (whatever is visible) update completely to the final state. Then I realized that hitting PrtScr solves my problem temporarily - but I cannot keep doing this.
When I installed the openssh server and connect using putty this problem does not exist. But it continues to do on the console.
uname -a show 4.15.0-45-generic.