One of my recessed light fixtures wouldn't turn on it. Got a new fixture. New fixture doesn't turn on. Voltage detector beeps on lead going to the fixture and neutral coming out. Thought that maybe mouse chewed the wire. Attempted to bypass switch and hook directly to power. Fixture still not lighting. Voltage detector beeps on both black and white. What the heck?
Check if the white you're connecting to is a 'permanent phase' coming from another switch, in older installation was allowed to use white as phase in switch circuits (white was permanent phase from junction box to switch and black coming out of the switch was the switched phase bringing phase to the fixture).