Static routes which start on dot character aren't served properly

Route example:

router.get('/.my-route/file.txt', ({ serveStatic }) => {
  serveStatic(`${MY_STATIC_FOLDER}/.my-route/file.txt`)
})

After deployment if I try opening the file it responds with the error like this:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>%%%%%%</RequestId>
<HostId>$$$$$$$$$$$$$$$$$$$$$$$$</HostId>
</Error>

Though it’s served fine locally and when going by non-edge permalink.

Please assist.
Thanks!

UPD:
the issue is not present when the path which starts on dot is served from the project root directly:
.my-route/file.txt,
instead of:
some-folder/.my-route/file.txt

@egor.mesyats We were not able to replicate this by using a directory that starts with a dot at the root or nested elsewhere in the path. I suspect there is some other issue with your project.