Issue with display settings

When I start a remote session with a computer everything is fine but as soon as I end the connection the remote computers display settings change to something different. For example I am remoting into a Mac that has a refresh rate of 60hz and when I end the session it puts its refresh rate to 24hz. Is there a way to make it so when I end the session the settings stay the same as it was when I started the session