Trigger code when ScriptableRenderFeature is disabled

Is there a way to trigger a custom code block in the style of OnDisable but for a ScriptableRenderFeature?

I’m using a feature that is storing some information in a rendertexture that is used in the skybox, when the feature gets disabled this information gets stuck and continues rendering to the skybox, so I wanted to solve this by clearing the rendertexture whenever the feature is disabled, but I can’t find an event like OnDisable to put this in. There is Dispose, but it doesn’t seem to get triggered when I need it.