New
#11
Martin Brinkmann recommends Res-o-matic for this exact task:
Change Display Resolutions Automatically
I tried it, and it works on W10/11. While you could write a script, this one creates a shortcut for any app.
When it asks, save your shortcut to the Desktop.
What doesn't work is new-style UWP apps masquerading as their legacy cousins (\Windows\System32\notepad.exe).