Failed to copy: local error: tls: bad record MAC while building a docker image

I have tried changing my wifi to hotspot on phone and tried restarting router, I tried all the AI solutions: clearing caches, restarting docker, using a debugger, changing app.js file location.

My app is a simple console.log("hello world"); and Dockerfile has this:

FROM node:alpine

COPY . /app

WORKDIR /app

CMD node app.js

I simply run: docker build -t hello-docker .

The second line which is COPY . /app is where the error arises after interrupting my download and this is the error I get:
ERROR: failed to solve: failed to compute cache key: failed to copy: local error: tls: bad record MAC

UPDATE:
So it’s an issue related to downloads disconnecting suddenly FOR ABSOLUTELY NO REASON and hence failing. I kept retrying the code countless of times until it could download that 50MB file without an error… and when it worked it no longer required downloading that file again. I would count this issue as solved already but if anyone knows what the explanation is for this issue, I’d be so thankful