It starts with the fact that designs, and the development that uses them, usually think in terms of fixed rectangles. You've got a 1920x1080 desktop rectangle and a 375x812 mobile rectangle and rarely is much thought put in to what happens when your viewport is a different size. And what thought that is put in goes toward horizontal differences, since the assumption is that things will just scroll vertically.
But, as you've noticed, with more complex UI (especially modals and toolbars fixed to the screen) it becomes more important that things are built to fit horizontally and vertically. It's not necessarily hard but it does take more thought to work out how things will shrink, grow, scroll, etc.