I think we need a bit more context to your problem.
Any block element by default will stretch vertically to contain its content. If it’s not doing that, it’s because you already did something to stop it doing that. Of course it it is taller than the screen, you will get a scroll bar.
FYI using height: 100% is something that will only work if the parent has a fixed height, or every parent right back to the root has 100% height set.
I’m not seeing anything in what you have shown that would cause a scroll bar.
It is likely to be a fixed or limited height. Use the browser’s Inspect tools to try and identify the cause.
Then you need to ensure that the element in question does not have a set height and then the viewport scrollbar will work.
If you are talking about an iframe still then you can set the iframe to the width and height of the viewport (assuming no other content) and the iframe will scroll as though it was a native window.
The demo may look a little confusing as its a codepen iframe inside a normal codepen.
Yes the scrolling attribute was deprecated and an iframe will scroll if its content does not fit within its height. The overflow:auto in my example was unnecessary.