My modal / sticky header is hidden behind other content. What causes that?
It is a stacking-context problem, not just a low z-index. A parent with transform, opacity < 1, filter or will-change creates a new stacking context that traps its children, so your z-index: 99999 still loses. We map the stacking contexts on the page and set a sane z-index scale (header, dropdown, modal, toast) instead of fighting it with bigger and bigger numbers.