Yes there is a way to disable GPIO3 (physical pin 5) pulled low to boot.
/boot/config.txt add the line
See the documentation for overlays in
/boot/overlays/README. The entry for
Info: Drives a GPIO high or low on poweroff (including halt). Enabling
this overlay will prevent the ability to boot by driving GPIO3 low.
Params: gpiopin GPIO for signalling (default 26)
active_low Set if the power control device requires a
high->low transition to trigger a power-down.
Note that this will require the support of a
custom dt-blob.bin to prevent a power-down
during the boot process, and that a reboot
will also cause the pin to go low.
input Set if the gpio pin should be configured as
export Set to export the configured pin to sysfs
Disabling GPIO3 boot behaviour is a documented side effect of enabling
gpio-poweroff. Best check you are not using GPIO 26 for anything, else you will need to change the default poweroff pin.
I am using this 'feature' on a RPi3 running Raspbian STRETCH.
I was experiencing similar issues of I2C devices triggering unwanted restarts once the Pi was in halt.