This happens only for some specific numerical values. Change anything (for example the position of a node by 0.1) and it will probably work as expected. Attached latex file, with example of broken and working diagram. Also an image of the pdf, in case it's related to my setup. This was found while using ktikz, that is why I use their tex-template.