Depends on local law.
In My Fair City a few years ago a cyclist was riding a crosswalk with a full-stop pedestrian signal and markings. Motorist hit him turning right. IIRC, killing him. Motorist didn't get ticketed because the cyclist didn't dismount. Lincoln, NE had a city ordinance that you MUST dismount to cross a street in a ped-crossing. There was a push to change that ordinance after that.
BUT....And this is the kicker.
That was pedestrian crossings. an MUT/bike-trail, like we have everywhere, you are supposed to RIDE and NOT dismount. A man a few years ago was hit and cited for dismounting where he shouldn't have (driver was as well, but it was deemed both were at "fault")...it was news to him.
So saying things monolithically about this is impossible. It is all about local law. What applies in Lincoln, NE does not apply to Waverly NE up the road not even 10 miles.