#### 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)
test/unit/utils/utils.js
import assert from 'assert';
import utils from '../../../lib/utils.js';
import FormData from 'form-data';
import stream from 'stream';
describe('utils', function (){
  it('should validate Stream', function () {
    assert.strictEqual(utils.isStream(new stream.Readable()),true);
    assert.strictEqual(utils.isStream({ foo: 'bar' }),false);
  });
  it('should validate Buffer', function () {
    assert.strictEqual(utils.isBuffer(Buffer.from('a')),true);
    assert.strictEqual(utils.isBuffer(null),false);
    assert.strictEqual(utils.isBuffer(undefined),false);
  });
  describe('utils::isFormData', function () {
    it('should detect the FormData instance provided by the `form-data` package', function () {
      [1, 'str', {}, new RegExp()].forEach(function (thing) {
        assert.equal(utils.isFormData(thing), false);
      });
      assert.equal(utils.isFormData(new FormData()), true);
    });
  });
});