Monkey patch a private method of ActiveStorage::VariantWithRecord

Don’t know if it corresponds to your issue but this is how I’ve been monkey-patching stuff in Rails: