Attach (recommended) or Link to PDF file here:

Configuration:
- Web browser and its version: Chrome 90.0.4430.93
- Operating system and its version: macOs Big Sur 11.2.3
- PDF.js version: 2.7.570
- Is a browser extension: No

Steps to reproduce the problem:
1. Load the attached pdf in https://mozilla.github.io/pdf.js/web/viewer.html
2. Go to page 46. Dotted lines are missing in the graphics (see screenshot from acrobat reader)

What is the expected behavior? (add screenshot) See the screenshot
[Technical_Guide_UK.pdf](https://github.com/mozilla/pdf.js/files/6413001/Technical_Guide_UK.pdf)
![Screenshot 2021-05-03 at 07 46 09](https://user-images.githubusercontent.com/3785784/116844541-a343fd80-abe3-11eb-94c3-d03b3dfd6769.png)

tmpCtx.clearRect(0, 0, newWidth, newHeight);
        tmpCtx.drawImage(
          imgToPaint,
          0,
          0,
          paintWidth,
          paintHeight,
          0,
          0,
          newWidth,
          newHeight
        );
        imgToPaint = tmpCanvas.canvas;
        paintWidth = newWidth;
        paintHeight = newHeight;
        tmpCanvasId = tmpCanvasId === "prescale1" ? "prescale2" : "prescale1";
      }
      ctx.drawImage(
        imgToPaint,
        0,
        0,
        paintWidth,
        paintHeight,
        0,
        -height,
        width,
        height
      );
      if (this.imageLayer) {
        const position = this.getCanvasPosition(0, -height);