I needed and alias setup for my macOS mail recently. I tried to use https://support.apple.com/lt-lt/guide/mail/mlhlp1205/mac but the aliases didn’t stick. Finally after consulting the Console I got an error saying that there could be only one account with that name (thanks Highlander.) I checked my Internet Accounts and found that there was indeed a second IMAP account that had somehow gotten synced from iCloud. Deleted that and it finally works as expected. Cute stuff Apple, fail without error in the GUI.