While my first reaction would be to stop using 3.5.1 in favor of an earlier Audacity such as 3.4.2 (particularly if this all used to work) I can tell you from super limited experience that you may not have enough variables covered.
This is the WAV export panel if you do it manually.
This is the correct, working macro command for audiobook Loudness Normalization.
Your Macro will have no idea what to do, particularly if the last thing you did was, for example, an MP3 export. Audacity will hang on to the Last Used Settings.
I have no idea how to fix what you’re doing. Someone else may post.
I succeeded!
Choose Edit → Preferences → Directories and enter the desired path in the “Macro output” field. Audacity will create a “macro-output” folder, in which it will place the macro-processed files. Now the export in the macro works