For a basic nav, you shouldn’t need to modify Webflow’s default nav menu arrangement at all - and if you do, you’ll likely end up with a broken nav.
Webflow.js is designed to open dropdowns a certain way, and create the hamburger mobile menu a certain way, and you’re changing the playing field so things don’t work as they are intended to when the scripts do their work.
That includes z-index.
However to answer your question as to why z-index isn’t behaving the way you expect, you might read up on “stacking order”.
Currently you have z-indexed items within other z-indexed items and that stacks them relative to each other, like this-
Here, the 1000 element is beneath the 100 element because the 1000 element has a parent element with a z-index of 3.
I would like to add only links to understand that the new “stacking context” is not created only with “z-index” (while in request it is ) but also with eg. isolate, transform , filter, rotate etc.