Hoping a physicist can correct me here, but... I believe index of refraction is a function of the photon being absorbed and reemitted by the electrons in the dielectric material, so it's no longer correct to think of a photon moving at a fraction of the speed of light inside the material, it's more like a churning series of them being created (always moving at c) but constantly being absorbed and canceling each other out.

I also seem to recall that the speed of light below c is actually the group velocity, and each individual photon still would move at c. I'm also not entirely sure if photons can be said to exist except at creation and absorption; isn't a photon a phenomenon best described by particle interactions, and moving through free space it's more correctly described as a field? Genuine question, though I somehow doubt I'd understand any good elaboration.

IANAPhysicist, though. I just play with light recreationally.

For those curious about what the above poster is talking about, here’s a well done video explaining the topic of the apparent changes of light’s “speed” through materials

3Blue1Brown - But why would light "slow down"? | Optics puzzles 3: https://m.youtube.com/watch?v=KTzGBJPuJwM