Doing context-aware previews in the WordPress Customizer

Since the code is using get_permalink( $page ), I would guess that $page holds an ID.

https://developer.wordpress.org/reference/functions/get_permalink/

In my opinion, it’s not always a good thing to switch the preview to another page for the user.