Unfortunately, the API for managing item categories in compose mode in Outlook on the web is currently not supported:
In Outlook on the web, you can't use the API to manage categories applied to a message in Compose mode.
The lack of this API results in a bad experience for our users, since it works in Outlook for Mac und Windows.