This reverts commit ceee405cec. This caused regressions, see #73736 and #73780. Fixes #73780.
ceee405cec
draw_dashed_line