@Jay Axigen will introduce IMAP support for permanent flags – it’s important to note, however, that client support for this differs, and we don’t have any other standard option at the moment than to work within their limitations:
Outlook does not support server side permanent flags over IMAP; i.e. Outlook categories are client only
Thunderbird supports permanent flags in their own flavor:
** it uses $label1, $label2, etc. as permanent flags persisted on the server via IMAP for their default labels (Important, Work, Personal, etc.), combined with their own local labels index, in order to display their names and colors in Thunderbird; this means that the WebMail and other clients will not be able to use them.
** it also allows the user to use custom labels, which are persisted as normal permanent flags and they will also show up and be manageable from WebMail; also, labels set from WebMail will be visible in Thunderbird. In conclusion, as long as the user uses custom labels, and not the default Thunderbird ones, labels will be fully synced with the server and the WebMail, respectively.
Mail.app on macOS only sets one permanent flag on the server (when “flagging” an email), which is reflected as $MailFlagBit2 and because it uses the “$” prefix it will not be visible in WebMail.