No a positioned element has a z-index of auto by default. That means it does not take part in any stacking level apart from its own position in the html. You need to give that element a z-index that suits its task. That’s why your dropdown is obscured by the border.
Usually a drop-down menu needs to be on top of everything so you would give it a high z index assuming it has no positioned ancestors. (The same applies to your h1 heading and its ancestors if they have a z-index applied other than auto).