Does re-battling Legendary Pokemon recalculate the chance to be Shiny?

So far I have battled Cressellia and Virizion (neither were Shiny).

I didn't capture them so they will reappear, but when they do: can they be shiny this time? Or are they now 'locked' to being not shiny after my first battle with them?


While the previous answer gave a good account of the concept of shinylocked pokemon, it did not answer OP's question.

The shininess of each legendary encountered in ultra wormholes are determined upon each individual encounter. Previous encounters in this scenario should not lock the shininess of the pokemon. So yes, you can still try to get shinies of Cresselia and Virizon when they reappear.