I found that the “27…” rule for A14 (rule_561) needs two insertions—17 after the 18, and 16 before the 20—and the “13…” rule for A20 (rule_591) needs five insertions (3, 12, 5 before A21 and 2, 1 after the existing 4 3) to exactly line up with the three segments of your target. No other changes are necessary.

Updated production rules:
rule_561: A14 -> 27 18 17 21 A23 16 20 19 18
rule_591: A20 -> 13 3 12 5 A21 11 4 2 3 1