Ah, if it's the first rival encounter then yes he is supposed to remain there until you complete the event in Berry Forest. My scripting skills suck so I do not know how to create perfect working events.. Thanks though!
there is a bug in your hack. Once you defeat your rival then go inside a building on three island he comes back but disappears once you talk to him and the bug repeats if you go back inside and out of a building.