I use a hairtail screen (ultrawide) in my home, and I remote login every day from my office.
Because the screen resolution is different, I have to change the resolution every time when remote connecting and then change it back when I get back home.
I was thinking Keyboard Maestro might be able to do the work?
Sorry for the bad English. I hope my grammar is not rude.
Thank you very much for reading this.