When you work a pattern like this, it may actually be, that you end your row / round within the repeat. That can happen.
But it does not happen here.
91 stitches, 18 for the repeat:
when you work, you do 1 to 18, 1 to18, 1 to 18 and so on. Do that 5 times. Then you have worked 90 stitches. And there is the miracle: the one stitch that is shown behind the repeat: the last stitch of your right side row or the first stitch of your wrong side row. It never gets worked, but only those times at the end of your row / at the beginning.
so you just work within the red box until you get to the end of the row and have one stitch left (seen from right side). That stitch is a purl on right side. Work it and your row is done.
Maybe, if you ended up somewhere within the middle of your repeat you were not reading the chart right? The repeat is the part in the red box. And only that. And stitches outside that box only get worked when you are done repeating.
This may be "starting rows" on the bottom. This may be edge oder beginning stitches on a row. Or finishing stitches or rows after the repeat.
here the problem to grasp is that one stitch after repeat No. 5. (and the one row on the bottom of the chart that does not get repeated, either.