Switching resolution wipes rendered layers? If you render with the usual F12 render button, then any previously rendered layers get blanked out and re-rendered. If you are manually rendering via the button on nodes in the compositor, you can render 1 layer at a time without blanking your other layers. However, if you render 1 layer manually, then change the resolution, then render another layer, it blanks the first one.

Is there any way to stop this from happening?

The context is that I'm working on a script that renders each layer with different settings, including different resolutions. I'm trying to keep all the layers live in the compositor.
Maybe something that auto-saves every render, and won't overwrite previous, just append a number to the end? Someone wrote a script that I think does this - https://blenderartists.org/t/autosave-every-render/425838/9