Macros currently only support exporting as mono or stereo. For multi-channel export you need to export manually (with “Custom Mix” enabled in Preferences: https://manual.audacityteam.org/man/import_export_preferences.html)
If you have FFmpeg for Audacity installed, you can export as AC3 using the “Export2” command. Note that this command requires that you set the full output file path and file name, including the file name extension (“.ac3”).