Download file attached to pull request comment on private repo

Is there a way to download a file attached to an pull request comment on a private repo via the API?

I found comments indicating that the API doesn’t support that and tried downloading using the URL from the issue, which looks something like [<username>/<repo>/files/<some_id>/<filename>](<username>/<repo>/files/<some_id>/<filename>) but I kept getting 404 error and I tried different authentication methods (using github app, client and secrets, user personal token, etc). How can I download pull request comment files programatically?