Issue with reassigning ctx.query and type preservation
## Describe the bug

**Node.js version:** <!-- Write your Node.js version. -->
16.15.1
**OS version:** <!-- Write your operating system and version. -->
Windows 11
**Description:** <!-- A clear and concise description of what the bug is. -->

Per the Koa docs, you can reassign to the ctx.query object. Whenever I do so, any typing that I have, is not preserved in future middleware or future calls to ctx.query (i.e. a value of [ 2 ] in the object just becomes '2' or the number 5 becomes the string '5'), although the actual assignment does seem to occur as indicated below by the fact that id becomes 4 after assignment, indicating something has changed.

## Actual behavior

INITIAL QUERY OBJECT [Object: null prototype] { id: '2', arr: '5' }
QUERY FROM JOI VALIDATION [Object: null prototype] { id: 2, arr: [ 5 ] }
number
CTX.QUERY AFTER ASSIGNMENT [Object: null prototype] { id: '4', arr: '5' }
QUERY IN 2ND MIDDLEWARE [Object: null prototype] { id: '4', arr: '5' }
string

## Expected behavior
This is what I would expect from code example below.

INITIAL QUERY OBJECT [Object: null prototype] { id: '2', arr: '5' }
QUERY FROM JOI VALIDATION [Object: null prototype] { id: 2, arr: [ 5 ] }
number
CTX.QUERY AFTER ASSIGNMENT [Object: null prototype] { id: 4, arr: [ 5 ] }
QUERY IN 2ND MIDDLEWARE [Object: null prototype] { id: 4, arr: [ 5 ] }
number

## Code to reproduce

<!-- Share code to reproduce here inside a code formatted block, gist, or a repository we can clone to reproduce. -->
I've included a stack overflow entry and code sandbox that replicates this issue in addition to my project on my Windows 11 computer.

https://stackoverflow.com/questions/75368044/unable-to-reassign-ctx-query-in-a-koa-middleware
```
const Koa = require("koa");
const app = new Koa();
const Joi = require("joi");
const PORT = 3000;
const validSchema = Joi.object({
  name: Joi.string().optional(),
  id: Joi.number().required().min(0),
  arr: Joi.array().items(Joi.number()).optional().single(),
});
// #1
app.use(async (ctx, next) => {
  console.log("INITIAL QUERY OBJECT", ctx.query);
  const { error, value } = validSchema.validate(ctx.query);
  if (!!error) ctx.throw(400, error);
  console.log("QUERY FROM JOI VALIDATION", value);
  value.id += 2;
  console.log(typeof value.id);
  ctx.query = value;
  console.log("CTX.QUERY AFTER ASSIGNMENT", ctx.query);
  await next();
});
// #2
app.use(async (ctx, next) => {
  console.log("QUERY IN 2ND MIDDLEWARE", ctx.query);
  console.log(typeof ctx.query.id);
  await next();
});

app.use(async (ctx, next) => {
  ctx.body = `test koa`;
});

app.listen(PORT);
console.log(`http://localhost:${PORT}`);
```
<!--
We encourage you to submit a pull request with a failing test:

1) This will make it more likely for us to prioritize your issue.
2) It's a good way to prove that the issue is related to this project and not your code.

## Checklist

- [ x] I have searched through GitHub issues for similar issues.
- [x ] I have completely read through the README and documentation.
- [ x] I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
