See https://github.com/clojure/clojure-site/issues/306 for some of the background information.
Because the clojure shell script groups all -A options together before any -M options, if you say -Mfoo -Abar it is actually treated as -Abar -Mfoo and any :main-opts from bar will be ignored (assuming foo has :main-opts). The shell script should expand -A options on the fly (and not use all_aliases).
tools.deps needs to be checked for how it handles this as well to ensure it respects ordering.
-M is now always expected to be after -A (and ideally won't use -A at all) which resolves the ambiguity here. moving to won't fix.
I read over the CLI/deps reference page and it references clj-opt to show those must come before -M or -X but clj-opt is never actually defined. I think that should be explicitly defined somewhere on the reference page as being -A, -J, and/or -S… (those are the only other official options now).
Also, the output of clojure -h indicates (incorrectly) that -A is an exec-option: