Excellent tip ! I don’t care so much about rotation lock, but was able to modify the automation to address a different pet peeve: I normally use dark mode, but find it hard to read for maps. So using this same automation approach, I was able to select Maps as the app, and for the action, search for “dark mode”, choose the setting, and voila!
I did have to create two automations, one to switch to light mode on app open, and the other to switch back to dark mode on app close, but it works! A long standing annoyance, gone.