Hi, Ralph:
If I suss out your intention correctly, suggested changes attached. Using a D.S. al coda and adding the "1st" repeat of the A section as actual bars, it still fits all on one page. To be played through to the D.S. then played with repeats again, then to Coda.
Also, attached is a screenie of the Ending dialogue box with three grammatical errors highlighted: 1: should read "consecutive", rather than "consecutively"; 2 and 3: the "nor"s are redundant -- "No gaps are possible within the repeat bars or when the song continues."
Also, in your attached screenie, on the second line "deteted" should be "detected."
Other than that, there's not a thing wrong!
David