A family of Microsoft word processing software products for creating web, email, and print documents.
Unfortunately, there seem to be no workaround for this. Reading the article at https://support.office.com/en-us/article/differences-between-using-a-document-in-the-browser-and-in-word-3e863ce3-e82c-4211-8f97-5b33c36c55f8 I see that Word Online does not support password-protected files. You should post feedback on this in the Uservoice forum at https://word.uservoice.com/forums/271331-word-online.