Maybe all you need to do is add this after line 63
function bringToTopofSVG(targetElement){
let parent = targetElement.ownerSVGElement;
parent.appendChild(targetElement);
}
if (elmClass == "Berlin" || elmClass =="Bremen"){
bringToTopofSVG(elm);
}
credit : javascript - How to use z-index in svg elements? - Stack Overflow
Also maybe change
elm.setAttribute('stroke', strokeOverColor);
to
if (elmClass == "Berlin") {
elm.setAttribute('stroke', "#76D6FF");
} else {
elm.setAttribute('stroke', strokeOverColor);
}
Although on that last bit you could just simply change the stroke colour when mouse over to something not the same as the fill colour?