In a hollow prism made of glass, most of the volume of the prism is filled by air. Only thin layer of glass makes the prism. It is like a light ray passing through two thin rectangular slabs. There is only a lateral shift but no dispersion as the interfaces between glass and air are parallel to each other.
When white light rays fall on one rectangular face S1 of the prism, light rays are refracted into the thin layer F1. They are a little dispersed due to different speeds of different wavelengths. However, when the different colors emerge from the surface S2, of layer F1, they become parallel again to each other due to refraction at the parallel face S2. It is like the case of a rectangular slab. The light rays suffer a lateral shift but travel in a direction CD parallel to the incident ray AB.
Similarly the incident ray CD on the surface S3 in the layer F2 gets refracted and emerges as EF and parallel to CD.