Widgets placed in a canvas use canvas zOrder:

Overlays utilise hierarchy order. Line drawing is different and draws on top of the same-widget hierarchy.
Make a User Widget whose job is to draw lines, add it to the canvas at the desired zOrder. It will then draw lines between the layers.