 {
  width: 100px;
  height: 2000px;
  background: green;
  position: relative;
  z-index: 2;
}
</style>
<svg style="width: 100px; height: 1000px; position: fixed">
  <rect width="200" height="2000" fill="red"/>
</svg>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<script>
  waitForAtLeastOneFrame().then(() => {
    window.scrollTo(0, 4000);
    waitForAtLeastOneFrame().then(() => {
      window.scrollTo(0, 0);
      takeScreenshot();
    });