When rendering in the main window and changing the active scene, RE_FreeUnusedGPUResources can free the resources of an active Render, since no wmWindow references the Scene anymore. Active Render instances always reference their Scene, so we check those directly instead. Pull Request: https://projects.blender.org/blender/blender/pulls/147553