It looks like the problem comes from the unit you used to set the height of your elements. CSS has several units similar to vh, but with different behaviors to better handle mobile layouts (for example when the Safari’s search bar appears or disappears).
I think you just need to replace your vh units with dvh.
You can refer to this article to learn more about these sizing units.