Theres almost certainly a better way to accomplish this but you could set the gathering chapter as the second to last chapter, then a repeatall 1, for example:
chapters 1-8 retainer scenario
chapter 9 repeat 1-8 X times
chapter 10 1 hour of gathering
chapter 11 repeatall 1
then when you want to start the scenario you just start on chapter 10, as long as you know you’ll be back before it finishes looping the retainer checking. You could also set the end of the gathering chapter to switch to a class without teleport on its bar, itll break logic when it loops back to gathering and cant teleport