can’t link C++ code to .dylib in Xcode 12.2 (release build only)
I did not intend to do a question-and-answer format. But after posting my question above, I tried searching harder in the main stackoverflow. I found a question by Oscar with an answer to my question by Yi Hu. To restate Yi Hu’s answer:

go to Project Settings
select the executable (“texsyn” in my case)
select Build Settings tab
search for Architectures
change Build Active Architecture Only to be Yes for BOTH Debug and Release

This totally solved my problem. Now builds without error and runs about twice as fast.
Before:

After: