It works great but now I have applied curvature to the geometry of the layer you can see both sides of the layer at once which isn't what this expression is designed for. From my understanding of this expression, it will only show the 'side' of the layer which is facing the camera so when both sides of the layer are on screen it uses which ever side is larger to be displayed on both sides.
I was wondering whether there is another expression anyone knows of or whether this expression could be adapted for the project I'm working on?
I have attached screenshots of the issue to help you understand what I'm trying to explain.
You will have to device this in a different way. The first solution that comes to mind is a precomp with a matching layer (of the single page that is turning) with a light on one side, that you can then use as a luma matte for one side of the page.