How to update ScreenToWorldPoint before Camera renders?

Let’s say I’m trying to temporarily change a camera’s position/rotation or projection matrix so that within the same frame I can use ScreenToWorldPoint to calculate things based on the temporary changes to the Camera. I want to later revert these changes (again, in the same frame) before rendering. These results would then be used over, say, the next second to accomplish my task.

However, it seems that things are not updated until the Camera renders. I’ve tried using .CopyTo to create a new Camera and get the information from there, but that doesn’t work. Nor do ResetWorldToCameraMatrix or ResetProjectionMatrix. Can anyone offer any insight?

I tried one thing…

my camera is at (0,0,0) and one cube is at (0,0,5).
so distance between two should be 5.

Now in LateUpdate() I changed camera position to (0,0,1).
NOTE: LateUpdate() is called after Camera.Render().
then in OnPreRender() I print distance between cube and camera.after that I changed camera position back to (0,0,0).

Result: distance in output is 4. but in scene rendering camera is always stays at (0,0,0).

In Short:
in LateUpdate() : Do changes into Camera
Do anything between this.
in OnPreRender() : revert changes into Camera