Hihat opening is placed outside bar when a rehearsal mark is added

This happens when I made a rehearsal mark after notation of this beat. Can it be fixed?

I guess you mean a repeat. How did you create it? Usually you select a barline and change it under Bars and Barlines. I guess you selected the last note, and not the barline? Just delete the red signpost.

Jesper