Reproduction steps:
1. Open the attached “BugRepro” project
2. Open the “Assets/Scenes/RendererDataChangeTest.unity” Scene
3. Enter the Play Mode
4. Click the “Renderer Data x” buttons in the Game view
5. Open the Memory Profiler (Window > Analysis > Memory Profiler)
6. In the “Memory Profiler“ window, click Capture
7. Open the captured snapshot on the left of the Memory Profiler
8. Go to RenderTexture (UnityObjects -> RenderTexture)
9. Check RenderTextures in the snapshot
Expected result: There should be no leftover Depth and Color Attachment buffers after switching renderers
Actual result: There are lots of Depth and Color Attachment buffers
Reproducible with: 2022.3.50f1, 6000.0.22f1
Couldn't test with: 2021.3.44f1 (there is no Memory Breakdowns feature)
Reproducible on: Windows 11
Not reproducible on: No other environment tested