Thanks For some reason I thought if they declared it flag to flag, they had to change bikes and it wasnt an option not too
I did forget to mention that in a flag to flag, should the rider pit they MUST leave on a bike that has different tyres to the bike on which they entered the pits.
Apologies as I forgot that part and it is actually a critical part of the rule.
Yes as far as I know it is only an option but generally when called most will pit with some exceptions where it is called late in the race as sometimes battling out in the wet on slicks will mean win or bin.
There is however no reverse as if a race is declared wet then the rider is always allowed to pit to change tyres/bikes etc for a drying track (flag to flag essentially came about to try to stop or minimise the red flag scenario because of light rain)