People are afraid to open their doors.
If you are afraid to open your door then turn off all the lights and/or go out for the evening. But sheesh, to leave a bunch of candy out unattended? You can blame the trick or treaters all you want, they don’t care. And you have seen enough Black Friday at Walmart videos to know what to expect. So it is up to you. It’s simple. Leave food out, expect the local wildlife.