Like most every other Pokémon, the Regis’ stats and shininess are determined when the battle starts, so you can either do the puzzle once, save in front of the statue, and SR until it’s shiny, or you can do the puzzle, encounter, run away, then do the puzzle again each encounter. I personally used SRs to hunt Regieleki, but I’ve seen some people say that it’s faster to hunt it using run aways, since SRs take so long on the Switch. Both methods work for shiny hunting them.