I have a song with 5 choruses of 24 bars, no ending. I loaded in a midi melody from a file and copied it to all choruses, then killed the middle choruses.

When it plays, the song ends with an ending on bars 1 and 2 of chorus 5, while the melody continues by itself until the end of chorus 5.