After a lot of research, finally We were able to fix this issue. As per this document we had to buy the Office 365 ProPlus
license and assign the same to the user to use the Office products in a shared environment. Once this license is been added to the user, they were not getting this issue, However a new issue was prompting, that the users were not getting the mails in their mail box. And when we send mail to that user, that email delivery was not successful and was getting this error "Your message to user mail id
couldn't be delivered. user
wasn't found at domain
"
To fix the second error, we had to buy the Exchange online
license and add that to the user, and then waited for a few minutes, and then we logged in to the Windows Virtual Desktop
and we setup the outlook again and everything started working properly, and the user was getting the mails.
You can also buy one single Office 365 Enterprise E3
license and assign it to the user as this has both ProPlus
and Office 365

You can see the comparison here.