Specialized design with CSS Grid / Flexbox

I hope I can get some tips to achieve a certain gallery design of images that I have been trying to recreate, here is the design:
enter the description of the image here

Link to the site https://www.styleshout.com/templates/preview/Sublime10/index.html

As you can see, one image in each row is a little higher than the other, and the other rows fit perfectly together.

Here's a miserable codepen attempt I've made, but I'm completely stuck on how to get this design:

body {
margin: 0;
Edge size: edge box;
screen: bending;
justify-content: center;
width: 100%;
}

figure {
margin: 0;
screen: online;
}

.gallery-container {
screen: bending;
flexible wrap: wrap;
justify-content: center;
align-elements: center;
width: 600px;


figure {
height: 350px;
image img {
width: 350px;
height: 350px;
}
}
}



  
  
  
  Gallery of flexible images


  

Thanks for any help!