#### Describe the bug

if the `httpsAgent` property is set, it is not excluded from `error.toJSON()` resulting in a circular reference error

```none
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'httpsAgent' -> object with constructor 'Agent'
    |     property 'sockets' -> object with constructor 'Object'
    |     ...
    |     property 'errored' -> object with constructor 'Object'
    --- property 'config' closes the circle
    at JSON.stringify (<anonymous>)
```

#### To Reproduce

```js
const agent = new https.Agent({  
  rejectUnauthorized: false
});

axios.get("some-dodgy-url", {
  httpsAgent: agent
}).catch((err) => {
  console.error(err.toJSON())
})
```

#### Expected behavior

The error object should be serialisable as JSON without throwing circular reference errors.

#### Environment
 - Axios 0.26.0

#### Additional context/Screenshots

See [this StackOverflow post](https://stackoverflow.com/q/71150003/283366)
lib/utils.js
});
  Object.defineProperties(obj, reducedDescriptors);
}
/**
 * Makes all methods read-only
 * @param {Object} obj
 */
const freezeMethods = (obj) => {
  reduceDescriptors(obj, (descriptor, name) => {
    
    if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
      return false;
    }
    const value = obj[name];
    if (!isFunction(value)) return;
    descriptor.enumerable = false;
    if ('writable' in descriptor) {
      descriptor.writable = false;
      return;
    }
    if (!descriptor.set) {
      descriptor.set = () => {
        throw Error('Can not rewrite read-only method \'' + name + '\'');
      };
    }
  });
}
const toObjectSet = (arrayOrString, delimiter) => {
  const obj = {};
  const define = (arr) => {