Given you may have data you want like bookmarks, this is recommended and cannot be automated.
For Microsoft Edge Users:
Open Edge.
Click on your profile picture (or person icon) in the top right corner of the browser window.
Click on "Manage profile settings" or "Sign out".
If you see an option to "Sign out" of your work account, click it.
Then, sign back in with your new Office 365 work credentials.
If you don't see an obvious sign out, go to Settings > Profiles and look for your work profile to sign out and then sign back in.
For Google Chrome Users:
Open Chrome.
Click on your profile picture (or person icon) in the top right corner of the browser window.
Click on "Manage your Google Account" or "Sign out".
If you see an option to "Sign out" of your work account, click it.
Then, sign back in with your new Office 365 work credentials.
If you don't see an obvious sign out, go to Settings > You and Google > Sync and Google services and manage your account from there.
After Updating: Close and reopen your browser to ensure the changes take full effect.