The parameter in the constructor is XSHUT:
https://github.com/stm32duino/VL53L4CX/ ... lass.h#L70So for the interrupt example:
A1 -> XSHUT
A2 -> GPIO
If interrupts are enabled and configured, the interrupt condition is indicated on the GPIO pin. It's up to you to tie into that pin - like A2 is done in the example. It doesn't need to be A2.
XSHUT simply disables / enables the sensor - like power on / power off. It's useful for resetting to a known state. You'd connect that to a digital out on your controller. That's what A1 is in the example, but it could be any other available pin.
In should be OK to leave off XSHUT and then just power cycle the setup. But if you are soft resetting things, so that the VL53L4CX does *not* get power cycled, then using XSHUT can help - since it will enforce a power cycle to a known state.
In terms of not getting data beyond a certain distance - it may take some testing and iterating. Checkout the datasheet:
https://www.st.com/resource/en/datasheet/vl53l4cx.pdfIt has some information about the field of view, the affects of different lighting conditions, as well as target reflectance: