XPLM_MSG_ENTERED_VR

#define XPLM_MSG_ENTERED_VR  109

Sent to your plugin right before X-Plane enters virtual reality mode (at which time any windows that are not positioned in VR mode will no longer be visible to the user).